TX_START
7374757677787980818283
{ TxLog txLog = new TxLog( txFile() ); assertTrue( !txLog.getDanglingRecords().hasNext() ); byte globalId[] = new byte[64]; byte branchId[] = new byte[45]; txLog.txStart( globalId ); txLog.addBranch( globalId, branchId ); assertEquals( 2, txLog.getRecordCount() ); // List lists[] = txLog.getDanglingRecords(); List<?> lists[] = getRecordLists( txLog.getDanglingRecords() ); assertEquals( 1, lists.length );
153154155156157158159160161162163
try { TxLog txLog = new TxLog( txFile() ); byte globalId[] = new byte[64]; byte branchId[] = new byte[45]; txLog.txStart( globalId ); txLog.addBranch( globalId, branchId ); txLog.markAsCommitting( globalId ); txLog.truncate(); assertEquals( 0, getRecordLists( txLog.getDanglingRecords() ).length );
161162163164165166167168169170171
txLog.truncate(); assertEquals( 0, getRecordLists( txLog.getDanglingRecords() ).length ); txLog.close(); txLog = new TxLog( txFile() ); txLog.txStart( globalId ); txLog.addBranch( globalId, branchId ); txLog.markAsCommitting( globalId ); txLog.close(); txLog = new TxLog( txFile() ); assertEquals( 1,