forked from TrueCloudLab/frostfs-node
[#1094] services/object: remove some FIXME comments
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1bdbd6ed22
commit
fbb95cff14
2 changed files with 7 additions and 2 deletions
|
@ -32,6 +32,8 @@ type RemoteHeadPrm struct {
|
||||||
node *netmap.NodeInfo
|
node *netmap.NodeInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const remoteOpTTL = 1
|
||||||
|
|
||||||
var ErrNotFound = errors.New("object header not found")
|
var ErrNotFound = errors.New("object header not found")
|
||||||
|
|
||||||
// NewRemoteHeader creates, initializes and returns new RemoteHeader instance.
|
// NewRemoteHeader creates, initializes and returns new RemoteHeader instance.
|
||||||
|
@ -85,7 +87,7 @@ func (h *RemoteHeader) Head(ctx context.Context, prm *RemoteHeadPrm) (*object.Ob
|
||||||
headPrm.SetClient(c)
|
headPrm.SetClient(c)
|
||||||
headPrm.SetPrivateKey(key)
|
headPrm.SetPrivateKey(key)
|
||||||
headPrm.SetAddress(prm.commonHeadPrm.addr)
|
headPrm.SetAddress(prm.commonHeadPrm.addr)
|
||||||
headPrm.SetTTL(1) // FIXME: use constant
|
headPrm.SetTTL(remoteOpTTL)
|
||||||
|
|
||||||
res, err := internalclient.HeadObject(headPrm)
|
res, err := internalclient.HeadObject(headPrm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -8,6 +8,9 @@ import (
|
||||||
"github.com/nspcc-dev/neofs-sdk-go/token"
|
"github.com/nspcc-dev/neofs-sdk-go/token"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// maxLocalTTL is maximum TTL for an operation to be considered local.
|
||||||
|
const maxLocalTTL = 1
|
||||||
|
|
||||||
type CommonPrm struct {
|
type CommonPrm struct {
|
||||||
local bool
|
local bool
|
||||||
|
|
||||||
|
@ -103,7 +106,7 @@ func CommonPrmFromV2(req interface {
|
||||||
ttl := meta.GetTTL()
|
ttl := meta.GetTTL()
|
||||||
|
|
||||||
prm := &CommonPrm{
|
prm := &CommonPrm{
|
||||||
local: ttl <= 1, // FIXME: use constant
|
local: ttl <= maxLocalTTL,
|
||||||
xhdrs: make([]*sessionsdk.XHeader, 0, len(xHdrs)),
|
xhdrs: make([]*sessionsdk.XHeader, 0, len(xHdrs)),
|
||||||
ttl: ttl - 1, // decrease TTL for new requests
|
ttl: ttl - 1, // decrease TTL for new requests
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue