Skip to content

Commit a171ab6

Browse files
committed
fix review comment
1 parent ed3fc91 commit a171ab6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ public CompletableFuture<Message> applyTransaction(
167167
if (scm.isInSafeMode() && refreshedAfterLeaderReady.get()) {
168168
scm.getScmSafeModeManager().refreshAndValidate();
169169
}
170-
transactionBuffer.updateLatestTrxInfo(TransactionInfo.valueOf(TermIndex.valueOf(trx.getLogEntry())));
170+
final TermIndex appliedTermIndex = TermIndex.valueOf(trx.getLogEntry());
171+
transactionBuffer.updateLatestTrxInfo(TransactionInfo.valueOf(appliedTermIndex));
172+
updateLastAppliedTermIndex(appliedTermIndex);
171173
} catch (Exception ex) {
172174
applyTransactionFuture.completeExceptionally(ex);
173175
ExitUtils.terminate(1, ex.getMessage(), ex, StateMachine.LOG);

0 commit comments

Comments
 (0)