mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Local object store behavior for Put of already existing objects #1123
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#1123
Loading…
Add table
Add a link
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?
Originally created by @roman-khimov on GitHub (Sep 9, 2023).
Is your feature request related to a problem? Please describe.
common.Storageinterface exposes aPut()function that's supposed to be pushing objects into the store. One canPutan object and thenPutit again. What happens next? Currently:Putsucceeds, returningnilIn general we suppose that objects are immutable and we have the same data for the same object. Which means that the first point is likely correct. If that's the case then the second one doesn't matter. However if you're to change the logic of FSTree to preserve an already existing file
TestRefillMetabaseCorruptedsuddenly starts to fail because it relies on this overwriting semantics.Describe the solution you'd like
We need to specify what the proper behavior is for all stores.
Describe alternatives you've considered
And it's not that easy, because:
niland don't care about overwriting, that's the most common casenillooks bad since writer would think that he has successfully pushed something into the store, but anyGetwould reveal that it's not exactly true (the data is different)nilmakes total senseSo, what do we really want from our stores?
@carpawell commented on GitHub (Sep 18, 2023):
I would say that double writing is not smth really expected (with a really few exceptions) and a separate status and a log record are debug-friendly.