static long checkTransactionId ( long currentTransactionId , FSEditLogOp op ) throws IOException { if ( currentTransactionId != - 1 ) { if ( op . getTransactionId ( ) != currentTransactionId + 1 ) { LOG . error ( "Read invalid txId=" + op . getTransactionId ( ) + " expectedTxId=" + ( currentTransactionId + 1 ) + ":" + op ) ; throw new IOException ( "checkTransactionId failed" ) ; } } currentTransactionId = op . getTransactionId ( ) ; return currentTransactionId ; }
Asserts the read operation is the expected one .