shard.Lock should receive LockPrm and return LockRes #1421

Open
opened 2024-10-08 08:15:14 +00:00 by a-savchuk · 0 comments
Member

The shard.Lock method has a weird signature

func (s *Shard) Lock(ctx context.Context, idCnr cid.ID, locker oid.ID, locked []oid.ID) error {


It should receive LockPrm and return LockRes like other methods, e. g.

// GetPrm groups the parameters of Get operation.
type GetPrm struct {
addr oid.Address
skipMeta bool
skipEvacCheck bool
}
// GetRes groups the resulting values of Get operation.
type GetRes struct {
obj *objectSDK.Object
hasMeta bool
}


func (s *Shard) Get(ctx context.Context, prm GetPrm) (GetRes, error) {

## Is your feature request related to a problem? Please describe. The `shard.Lock` method has a weird signature https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/5fbb2657ca9ca9bbc3aa2ca9239fbb55ea47cdc3/pkg/local_object_storage/shard/lock.go#L21 It should receive `LockPrm` and return `LockRes` like other methods, e. g. https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/0c49bca19c82d574c9a93681bda77362edd5b88c/pkg/local_object_storage/shard/get.go#L28-L39 https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/0c49bca19c82d574c9a93681bda77362edd5b88c/pkg/local_object_storage/shard/get.go#L78
a-savchuk added the
enhancement
good first issue
P3
triage
labels 2024-10-08 08:15:14 +00:00
fyrchik added
refactoring
and removed
enhancement
labels 2024-10-08 08:16:02 +00:00
a-savchuk self-assigned this 2024-12-11 12:13:08 +00:00
a-savchuk added
internal
and removed
triage
labels 2024-12-11 12:29:39 +00:00
a-savchuk removed their assignment 2024-12-12 08:14:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1421
No description provided.