client: SetCopiesNumber is not backward compatible #93
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#93
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Client package defines
SetCopiesNumber
function on object put initial parameter. This function should be deprecated in favor ofSetCopiesNumberByVector
but its still there to keep compatibility. However this function does not provide compatibility when it is used with zero value.Expected Behavior
Calling
SetCopiesNumber
with zero value enforces storage to store all object copies before sending a reply.Current Behavior
Calling
SetCopiesNumber
with zero values enforces storage to not store object at all.Possible Solution
With protocol update
nil
value of placement vector works the same as zero value before, so the code can look like thisSteps to Reproduce (for bugs)
Context
This issue was found when I tried to use newer version of storage nodes with software that imports SDK with version
237b90f744f3
.Regression
Regression introduced in #46
Your Environment
g5b75432c
/cc @TrueCloudLab/storage-core-committers @TrueCloudLab/storage-core-developers
Also, should we mark
SetCopiesNumber
as deprecated? I don't think this function should be supported in future versions of SDK.Why don't we fix node rather than SDK?
As I remeber we decided that one value in vector should behave as previous. So set
0
(usingSetCopiesNumber
) or[]int{0}
(usingSetCopiesNumberByVector
) should pass[]int{0}
to the node which will handle this case properly.[0]
copies numbers #473Done in TrueCloudLab/frostfs-node#474