You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/12 00:40:30 UTC

[GitHub] [ozone] errose28 commented on a diff in pull request #3403: HDDS-6732. Follower SCM crashed during snapshot installation.

errose28 commented on code in PR #3403:
URL: https://github.com/apache/ozone/pull/3403#discussion_r870852667


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java:
##########
@@ -133,6 +133,15 @@ public CompletableFuture<Message> applyTransaction(
       final TransactionContext trx) {
     final CompletableFuture<Message> applyTransactionFuture =
         new CompletableFuture<>();
+    if (getLifeCycleState().isPausingOrPaused()) {
+      // Statemachine is installation snapshot. Discard any request.

Review Comment:
   Is this necessary? Shouldn't Ratis handle making sure we are not applying a transaction while a snapshot is being installed?



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -79,7 +79,8 @@ static class Batch {
 
   private final Lock lock;
   private final long batchSize;
-  private final StateManager stateManager;
+  private StateManager stateManager;
+  private final SCMHAManager scmhaManager;

Review Comment:
   This looks unused as a field, can we keep it local to the constructor?



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -79,7 +79,8 @@ static class Batch {
 
   private final Lock lock;
   private final long batchSize;
-  private final StateManager stateManager;
+  private StateManager stateManager;
+  private final SCMHAManager scmhaManager;

Review Comment:
   This looks unused as a field, can we keep it local to the constructor?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org