Buffer#setLongRecordPointer() - now asserts isDataPage()
Buffer#addGarbageChain() - yes, it's just a validity check. I moved that code into a helper so that the entire loop is controlled by the -ea switch. Unfortunately it would be prohibitively expensive to walk the garbage chains to verify that there are no redundant pages; this is a cheap check that could catch a corruption somewhat earlier than otherwise.
Renamed isMine() and isOther() to isOwnedAsWriterByMe() and isOwnedAsWriterByOther() for clarity.
Added text/documentation to several asserts and did some further cleanup. For example there was the
Thanks for the review.
Buffer# setLongRecordPo inter() - now asserts isDataPage()
Buffer# addGarbageChain () - yes, it's just a validity check. I moved that code into a helper so that the entire loop is controlled by the -ea switch. Unfortunately it would be prohibitively expensive to walk the garbage chains to verify that there are no redundant pages; this is a cheap check that could catch a corruption somewhat earlier than otherwise.
Renamed isMine() and isOther() to isOwnedAsWriter ByMe() and isOwnedAsWriter ByOther( ) for clarity.
Added text/documentation to several asserts and did some further cleanup. For example there was the
assert rightPage != -1
which was actually superfluous.