bshashikant commented on a change in pull request #2294:
URL: https://github.com/apache/ozone/pull/2294#discussion_r644515940
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -132,6 +135,17 @@ public void initialize(RaftServer server, RaftGroupId id,
final SCMRatisRequest request = SCMRatisRequest.decode(
Message.valueOf(trx.getStateMachineLogEntry().getLogData()));
applyTransactionFuture.complete(process(request));
+ // After restart ratis replay logs from last snapshot index.
+ // So if some transactions which need to be updated to DB will not be
+ // applied to DB. After a restart of SCM container/pipeline managers
+ // have setup the safemode rules with not to update DB. Due to this
+ // some time safemode rules are not validated and SCM does not exit
+ // safe mode. So, once after restart as transactions are applied, we
+ // check whether safe mode rules are validated to solve the issue of
+ // SCM not coming out of safemode.
+ if (scm.isInSafeMode()) {
+ scm.getScmSafeModeManager().refreshAndValidate();
Review comment:
probably, this code will go off in the next patch.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -132,6 +135,17 @@ public void initialize(RaftServer server, RaftGroupId id,
final SCMRatisRequest request = SCMRatisRequest.decode(
Message.valueOf(trx.getStateMachineLogEntry().getLogData()));
applyTransactionFuture.complete(process(request));
+ // After restart ratis replay logs from last snapshot index.
+ // So if some transactions which need to be updated to DB will not be
+ // applied to DB. After a restart of SCM container/pipeline managers
+ // have setup the safemode rules with not to update DB. Due to this
Review comment:
The comment is not clear here.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -80,6 +81,8 @@
// and reinitialize().
private DBCheckpoint installingDBCheckpoint = null;
+ private Daemon leaderReady;
Review comment:
leaderReady -> leaderReadyDetector
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
##########
@@ -437,7 +437,7 @@ private RpcType setRpcType(RaftProperties properties) {
private void setPendingRequestsLimits(RaftProperties properties) {
- final int pendingRequestsByteLimit = (int)conf.getStorageSize(
+ final long pendingRequestsByteLimit = (int)conf.getStorageSize(
Review comment:
The change is not related. Let's revert this in this jira.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -80,6 +81,8 @@
// and reinitialize().
private DBCheckpoint installingDBCheckpoint = null;
+ private Daemon leaderReady;
Review comment:
Please add some doc on what this thread is supposed to do.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -132,6 +135,17 @@ public void initialize(RaftServer server, RaftGroupId id,
final SCMRatisRequest request = SCMRatisRequest.decode(
Message.valueOf(trx.getStateMachineLogEntry().getLogData()));
applyTransactionFuture.complete(process(request));
+ // After restart ratis replay logs from last snapshot index.
+ // So if some transactions which need to be updated to DB will not be
+ // applied to DB. After a restart of SCM container/pipeline managers
+ // have setup the safemode rules with not to update DB. Due to this
Review comment:
Its better to mention safeMode rules might work with stale data.
--
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]