HAMMER 22/many: Recovery and B-Tree work.
* More work on the recovery code. Interlock cluster header loading with
the recovery operation and fix numerous bugs.
* Move some of the complexity of an AS-OF B-Tree lookup out of btree_search()
and into btree_lookup(). Now btree_search() can just fail normally and
btree_lookup() checks for the edge case. The situation that occurs is
this:
10 15 20
| |
LEAF1 LEAF2
(12) (18)
If the boundary only differs by the delete_tid element, and we are doing
a lookup AS-OF timestamp 14, we will traverse into LEAF1 which contains
no visible nodes (element @ timestamp 12 has been deleted as-of 14).
btree_lookup() now checks for the edge case and iterates the search
to locate the visible element (18) in LEAF2.
It's a bit more complex then that, but that's the basic issue.
* Fix a leaf-splitting case due to the new spike topology.
* Change the spike's ending element to be range-exclusive instead of range-
inclusive, matching all other end-range keys in HAMMER. Adjust the B-Tree
code to handle the case.
* Normalize debugging output into the volume:cluster:node_offset form
that the 'hammer show' utility uses.
13 files changed: