-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Operating System
MacOS 26.3.1
Go Version
1.26.1
Package Version
v0.1.4
Affected Packages
- collections/skipmap
Expected Behavior
The effect of Store(key, value) operations must cause the value to be visible to subsequent operations.
Actual Behavior
A Store completes successfully but its value is never observed. A subsequent LoadAndDelete returns nil, and no operation accounts for the removal of the stored value. (see reproduction)
Reproduction Steps
See #263
A porcupine linearizability test reliably reproduces this with 16 goroutines performing a uniform mix of Load, LoadOrStore, Store, and LoadAndDelete on 10 keys (200 ops per client). The failure is intermittent but typically triggers within a few runs.
Observed timeline
LoadAndDelete(key_0) -> 700091 [deletes the old value]
Store(key_0, 200019) [concurrent, should install new value]
LoadAndDelete(key_0) -> nil [value from Store is gone]
There is no valid linearization of these operations: if Store(key_0, 200019) linearizes after the first LoadAndDelete, the key should hold 200019. The second LoadAndDelete returning nil means the Store's effect was lost without any corresponding delete.
Other Information
No response