* VLSN->LSN mapping. Called outside the log write latch.
* @throws DatabaseException
*/
@Override
public void registerVLSN(LogItem logItem) {
LogEntryHeader header = logItem.getHeader();
VLSN vlsn = header.getVLSN();
if (LogEntryType.LOG_TXN_COMMIT.getTypeNum() == header.getType() ||
LogEntryType.LOG_TXN_ABORT.getTypeNum() == header.getType()) {
/* Track transaction end VLSNs */
repNode.currentTxnEndVLSN(vlsn);
}
/*
* Although the very first replicated entry of the system is never a
* syncable log entry type, the first GlobalCBVLSN of the system must
* start at 1. If we only track the first syncable entry, the
* GlobalCBVLSN will start a a value > 1, and replicas that are
* starting up from VLSN 1 will be caught in spurious network restores
* because VLSN 1 < the GlobalCBVLSN. Therefore treat the VLSN 1 as a
* syncable entry for the sake of the GlobalCBVLSN.
*/
if (LogEntryType.isSyncPoint(header.getType()) ||
VLSN.FIRST_VLSN.equals(vlsn)) {
repNode.trackSyncableVLSN(vlsn, logItem.getNewLsn());
}
vlsnIndex.put(logItem);
}