page11
HAMMER Pruning
1:10
Every B-Tree record has a CREATE_TID and a DELETE_TID.
CREATE_TID is part of the sorting key, DELETE_TID is not.
Deletions simply set the DELETE_TID in the existing record.
Updates set DELETE_TID and insert a new record with new CREATE_TID.
Transaction ids increase monotonically but do not reflect real time.
10:15
15:22
22:35
35:40
40:48
Snapshot
Snapshot
Snapshot
1:10
15:22
40:48
Remaining elements not expanded to fill voids:
Modifying CREATE_TID interferes with mirroring.
Modifying CREATE_TID considered too dangerous.
Once pruned, only snapshot TIDs prior to most recent snapshot are valid.
Expanding DELETE_TID doesn't work well either.
Before Prune
After Prune