Code review comment for lp:~pbeaman/akiban-persistit/fix-1021734-nightly-deadlock

Revision history for this message
Peter Beaman (pbeaman) wrote :

Thanks for the review.

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

  assert rightPage != -1

which was actually superfluous.

« Back to merge proposal