bshashikant commented on a change in pull request #2249:
URL: https://github.com/apache/ozone/pull/2249#discussion_r634155011
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -84,20 +81,16 @@
private DBCheckpoint installingDBCheckpoint = null;
public SCMStateMachine(final StorageContainerManager scm,
- final SCMRatisServer ratisServer, SCMHADBTransactionBuffer buffer)
- throws SCMException {
+ SCMHADBTransactionBuffer buffer) {
this.scm = scm;
this.handlers = new EnumMap<>(RequestType.class);
this.transactionBuffer = buffer;
TransactionInfo latestTrxInfo = this.transactionBuffer.getLatestTrxInfo();
- if (!latestTrxInfo.isDefault() &&
- !updateLastAppliedTermIndex(latestTrxInfo.getTerm(),
- latestTrxInfo.getTransactionIndex())) {
- throw new SCMException(
- String.format("Failed to update LastAppliedTermIndex " +
- "in StateMachine to term:{} index:{}",
- latestTrxInfo.getTerm(), latestTrxInfo.getTransactionIndex()
- ), SCM_NOT_INITIALIZED);
+ if (!latestTrxInfo.isDefault()) {
Review comment:
@GlenGeng , can you please check this code change.I think its the right
approach to get the last applied index from the transaction info table
irrespective of what the current stateMachine applied index is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]