forked from TrueCloudLab/frostfs-node
[#1471] eacl: Prevent aborting on local storage failure
Request processing should not be interrupted in case of local storage failure since error case in normal for relay nodes. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a97ea2aa21
commit
8b94cb22d3
1 changed files with 2 additions and 6 deletions
|
@ -11,7 +11,6 @@ import (
|
||||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||||
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
|
||||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||||
)
|
)
|
||||||
|
@ -187,22 +186,19 @@ func (h *cfg) objectHeaders() ([]eaclSDK.Header, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *cfg) localObjectHeaders(cnr cid.ID, idObj *oid.ID) ([]eaclSDK.Header, error) {
|
func (h *cfg) localObjectHeaders(cnr cid.ID, idObj *oid.ID) ([]eaclSDK.Header, error) {
|
||||||
var obj *objectSDK.Object
|
|
||||||
var err error
|
|
||||||
|
|
||||||
if idObj != nil {
|
if idObj != nil {
|
||||||
var addr oid.Address
|
var addr oid.Address
|
||||||
addr.SetContainer(cnr)
|
addr.SetContainer(cnr)
|
||||||
addr.SetObject(*idObj)
|
addr.SetObject(*idObj)
|
||||||
|
|
||||||
obj, err = h.storage.Head(addr)
|
obj, err := h.storage.Head(addr)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return headersFromObject(obj, cnr, idObj), nil
|
return headersFromObject(obj, cnr, idObj), nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Still parse addressHeaders, because the errors is ignored in some places.
|
// Still parse addressHeaders, because the errors is ignored in some places.
|
||||||
return addressHeaders(cnr, idObj), err
|
return addressHeaders(cnr, idObj), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func cidHeader(idCnr cid.ID) sysObjHdr {
|
func cidHeader(idCnr cid.ID) sysObjHdr {
|
||||||
|
|
Loading…
Reference in a new issue