code: void rollback(Transaction tx) {
  		ReversibleIterator<LogRecord> iter = new LogRecordIterator();
  		LogSeqNum txUnDoNextLSN = null;
  		while (iter.hasNext()) {
  			LogRecord rec = iter.next();
  			if (rec.txNumber() == txNum) {
  				if (txUnDoNextLSN != null) {
  					if (txUnDoNextLSN.compareTo(rec.getLSN()) != 1)
  						continue;
  				}
  				if (rec.op() == OP_START)
  					return;
  				else if (rec instanceof LogicalEndRecord) {
  
  					// Undo this Logical operation;
  					rec.undo(tx);
  					/*
  					 * Extract the logicalStartLSN form rec by casting it as a
  					 * LogicalEndRecord
  					 */
  					LogSeqNum logicalStartLSN = ((LogicalEndRecord) rec).getlogicalStartLSN();
  
  					/*
  					 * Save the Logical Start LSN to skip the log records
  					 * between the end record and the start record
  					 */
  					txUnDoNextLSN = logicalStartLSN;
  
  				} else
  					rec.undo(tx);
  			}
  		}
  	}
docs: Rolls back the transaction. The method iterates through the log records,
  calling {@link LogRecord#undo(Transaction)} for each log record it finds
  for the transaction, until it finds the transaction's START record.