forked from TrueCloudLab/frostfs-node
[#1555] local_object_storage: Rename method GetLocked
-> GetLocks
Renamed to better reflect the method's purpose of returning locks for the specified object. Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
e9837bbcf9
commit
72470d6b48
4 changed files with 15 additions and 15 deletions
|
@ -72,10 +72,10 @@ func (s *Shard) IsLocked(ctx context.Context, addr oid.Address) (bool, error) {
|
|||
return res.Locked(), nil
|
||||
}
|
||||
|
||||
// GetLocked return lock id's of the provided object. Not found object is
|
||||
// GetLocks return lock id's of the provided object. Not found object is
|
||||
// considered as not locked. Requires healthy metabase, returns ErrDegradedMode otherwise.
|
||||
func (s *Shard) GetLocked(ctx context.Context, addr oid.Address) ([]oid.ID, error) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "Shard.GetLocked",
|
||||
func (s *Shard) GetLocks(ctx context.Context, addr oid.Address) ([]oid.ID, error) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "Shard.GetLocks",
|
||||
trace.WithAttributes(
|
||||
attribute.String("shard_id", s.ID().String()),
|
||||
attribute.String("address", addr.EncodeToString()),
|
||||
|
@ -86,5 +86,5 @@ func (s *Shard) GetLocked(ctx context.Context, addr oid.Address) ([]oid.ID, erro
|
|||
if m.NoMetabase() {
|
||||
return nil, ErrDegradedMode
|
||||
}
|
||||
return s.metaBase.GetLocked(ctx, addr)
|
||||
return s.metaBase.GetLocks(ctx, addr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue