diff --git a/pkg/local_object_storage/engine/shards.go b/pkg/local_object_storage/engine/shards.go index beea58268..e0cc8d776 100644 --- a/pkg/local_object_storage/engine/shards.go +++ b/pkg/local_object_storage/engine/shards.go @@ -38,7 +38,7 @@ func (e *StorageEngine) AddShard(opts ...shard.Option) (*shard.ID, error) { shard.WithID(id), shard.WithExpiredTombstonesCallback(e.processExpiredTombstones), shard.WithExpiredLocksCallback(e.processExpiredLocks), - shard.WitDeletedLockCallback(e.processDeletedLocks), + shard.WithDeletedLockCallback(e.processDeletedLocks), )...) if err := sh.UpdateID(); err != nil { diff --git a/pkg/local_object_storage/shard/lock_test.go b/pkg/local_object_storage/shard/lock_test.go index 2ac3c6ba8..81558dbf3 100644 --- a/pkg/local_object_storage/shard/lock_test.go +++ b/pkg/local_object_storage/shard/lock_test.go @@ -33,7 +33,7 @@ func TestShard_Lock(t *testing.T) { shard.WithMetaBaseOptions( meta.WithPath(filepath.Join(rootPath, "meta")), ), - shard.WitDeletedLockCallback(func(_ context.Context, addresses []oid.Address) { + shard.WithDeletedLockCallback(func(_ context.Context, addresses []oid.Address) { sh.HandleDeletedLocks(addresses) }), } diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index 47a82500a..16aca5f15 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -234,9 +234,9 @@ func WithTombstoneSource(v TombstoneSource) Option { } } -// WitDeletedLockCallback returns option to specify callback +// WithDeletedLockCallback returns option to specify callback // of the deleted LOCK objects handler. -func WitDeletedLockCallback(v DeletedLockCallback) Option { +func WithDeletedLockCallback(v DeletedLockCallback) Option { return func(c *cfg) { c.deletedLockCallBack = v }