Rollback after creating ClassIndex entry may leave unsafe state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Akiban Persistit |
Fix Released
|
Critical
|
Peter Beaman |
Bug Description
This bug was detected while investigating https:/
ClassIndex is responsible for associating an int-valued handle with a Class. To create a new handle-Class pair, it inserts records into a Tree in the system volume. This is done within the scope of a Transaction. Code such as
exchange.
could invoke ClassIndex to write the hande-Class pair for RowData.class, for example. Further, that code could be embedded in a transaction that subsequently rolls back.
In that case, the update to the system volume never occurs, and when Persistit shuts down and restarts the association between the handle, which may now be used to identify the class for many records in the database, has been lost.
Related branches
- Peter Beaman: Approve
- Akiban Build User: Needs Fixing
- Nathan Williams: Approve
-
Diff: 767 lines (+407/-111)5 files modifiedsrc/main/java/com/persistit/ClassIndex.java (+153/-89)
src/main/java/com/persistit/ClassInfo.java (+5/-1)
src/main/java/com/persistit/Persistit.java (+7/-8)
src/test/java/com/persistit/ClassIndexTest.java (+213/-13)
src/test/java/com/persistit/MockSerializableObject.java (+29/-0)
security vulnerability: | yes → no |
visibility: | private → public |
Changed in akiban-persistit: | |
milestone: | none → 3.1.3 |
assignee: | nobody → Peter Beaman (pbeaman) |
Changed in akiban-persistit: | |
status: | Confirmed → Fix Committed |
Changed in akiban-persistit: | |
status: | Fix Committed → Fix Released |