Accumulator state sometimes missing from checkpoint
Bug #1064565 reported by
Peter Beaman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
Critical
|
Peter Beaman |
Bug Description
The state of an Accumulator is sometimes incorrect after shutting down and restarting Persistit and as a result an application can read a count or value that is inconsistent with the history of committed transactions.
The bug mechanism is a race between the CheckpointManag
This is a data loss error and is therefore critical.
Related branches
lp:~pbeaman/akiban-persistit/fix-accumulator-checkpoint-failure
- Nathan Williams: Approve
-
Diff: 367 lines (+209/-17)8 files modifiedsrc/main/java/com/persistit/Accumulator.java (+31/-11)
src/main/java/com/persistit/CheckpointManager.java (+8/-1)
src/main/java/com/persistit/Persistit.java (+3/-3)
src/main/java/com/persistit/RecoveryManager.java (+1/-1)
src/main/java/com/persistit/Transaction.java (+6/-0)
src/main/java/com/persistit/TransactionPlayer.java (+7/-1)
src/main/java/com/persistit/util/SequencerConstants.java (+10/-0)
src/test/java/com/persistit/Bug1064565Test.java (+143/-0)
Changed in akiban-persistit: | |
assignee: | nobody → Peter Beaman (pbeaman) |
Changed in akiban-persistit: | |
status: | Confirmed → Fix Committed |
Changed in akiban-persistit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Bug has been reproduced within a new unit test Bug1064565Test.
Method:
ThreadSequencer is used to create a schedule in which
- Thread A executing CheckpointManag er#createCheckp oint method blocks after assigning the checkpoint timestamp but before reviewing the acquiring the accumulator checkpoint list.
- Thread B invokes Accumulator#update while A is blocked, after which both threads are allowed to complete.
Close and restart Persistit and verify state of accumulator.