Writecache potential consistency issues #634
Labels
No Label
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 Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#634
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. 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 :)