commitEntry.getReplicaSyncPolicy() :
noAckSyncPolicy;
logReplay(repTxn, needsAck, syncPolicy);
final TxnCommit masterCommit =
(TxnCommit) logEntry.getMainItem();
if (needsAck) {
/*
* Only wait if the replica is not lagging and the
* durability requires it.
*/
repNode.getVLSNFreezeLatch().awaitThaw();
repNode.getMasterStatus().assertSync();
}
repTxn.commit(syncPolicy,
new ReplicationContext(lastReplayedVLSN),
masterCommit.getMasterNodeId());
final long masterCommitTimeMs =
masterCommit.getTime().getTime();
lastReplayedTxn = new TxnInfo(lastReplayedVLSN,
masterCommitTimeMs);
updateCommitStats(needsAck, syncPolicy, startNs);