[#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:
Aleksey Savchuk 2024-12-11 14:43:36 +03:00
parent e9837bbcf9
commit 72470d6b48
Signed by: a-savchuk
GPG key ID: 70C0A7FF6F9C4639
4 changed files with 15 additions and 15 deletions

View file

@ -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)
}