Writecache potential consistency issues #634
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#634
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?
I've been thinking in a few cases where the current writecache implementations seem to be racy, although I don't have a concrete test to display the issue yet. So I'll open an issue to discuss and collect such cases.
Delete
method from writecache deletes it from the cache, but never checks against the backing storage. For example, if aDelete
call is issued while a flush worker isPut
ting the same object, couldn't it happen that after callingDelete
, you still get the object withGet
due to such race? This would be unfortunate because the system wouldn't make any further progress to get out of the inconsistency.Put(k1, v_small), Put(k1, v_large), Get(k1)
could return eitherv_small
orv_large
due to the flush behavior.Generally speaking, I feel there are many edge cases like this and I would strongly recommend taking a critical look at our consistency model and writecache invariants.
Related: #610
key
is defined byvalue
(key is hash of value), so this case isundefined behaviour
i think :)