Page deallocation can permanently lose pages

Bug #1053680 reported by Peter Beaman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Akiban Persistit
Fix Released
Medium
Peter Beaman

Bug Description

Persistit r369

When removing records causes deallocation of chain of pages configured in a particular way, a garbage page, and possibly many pages linked to it, may be stranded in a volume. The result is irrecoverable loss of space in the volume file.

This phenomenon was discovered while reviewing code in the com.persistit.VolumeStructure class and confirmed with a new test.

Required pre-conditions:

- the chain of pages being deallocated must contain long records (records stored in long-record chains)
- the volume must have no garbage root page, or the garbage root page must be full so that the attempt to add the new garbage chain will cause overflow.

The mechanism is that the first page of the chain being deallocated is converted to a garbage page and linked to the original garbage page. However, before the linkage is completed, the long record chains in the about-to-be garbage page are themselves deallocated. The calls are nested, and so by the time the original deallocation process continues, the garbage root has changed. This leaves the original garbage root stranded.

For now I am marking this MEDIUM since the likelihood of these conditions converging is fairly low and we have no installations in the field in which this causes evident problems. However, we need to fix this to avoid the possibility of major debris in active volumes.

Related branches

Peter Beaman (pbeaman)
Changed in akiban-persistit:
assignee: nobody → Peter Beaman (pbeaman)
milestone: none → 3.1.8
Peter Beaman (pbeaman)
Changed in akiban-persistit:
status: Confirmed → Fix Committed
Peter Beaman (pbeaman)
Changed in akiban-persistit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.