INCompressorTest.java | Class | Test that BIN compression occurs in the various ways it is supposed to.
These are:
- transactional and non-transactional delete,
- delete duplicates and non-duplicates,
- removal of empty sub-trees (duplicates and non-duplicates),
- compression of BIN for deleted DIN subtree.
- removal of empty BIN after deleting a DIN subtree.
- undo causes compression of inserted LN during abort and recovery,
- redo causes compression of deleted LN during recovery,
Also test that compression retries occur after we attempt to compress but
cannot because:
- cursors are open on the BIN when the compressor dequeues them,
- cursors are open when attempting to delete a sub-tree (dup and non-dup
are two separate code paths).
- a deleted key is locked during compression (NOT TESTED - this is very
difficult to reproduce),
Possible problem: When we attempt to delete a subtree because the BIN is
empty, we give up when NodeNotEmptyException is thrown by the search.
However, this is thrown not only when entries have been added but also when
there are cursors on the BIN; it seems like we should retry in the latter
case. |