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 2021/06/28 02:52:32 UTC

[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2349: HDDS-4928. Support container move in Replication Manager

JacksonYao287 commented on a change in pull request #2349:
URL: https://github.com/apache/ozone/pull/2349#discussion_r659435202



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -458,6 +505,37 @@ private void updateInflightAction(final ContainerInfo container,
           if (health != NodeState.HEALTHY || a.time < deadline
               || filter.test(a)) {
             iter.remove();
+
+            if (inflightMove.containsKey(id)) {
+              boolean isInflightReplication =
+                  inflightActions.equals(inflightReplication);
+              //if replication is completed , nothing to do
+              if (!(isInflightReplication && filter.test(a))) {
+                if (isInflightReplication) {
+                  if (health != NodeState.HEALTHY) {
+                    inflightMoveFuture.get(id).complete(
+                        MoveResult.REPLICATION_FAIL_NODE_UNHEALTHY);
+                  } else {
+                    inflightMoveFuture.get(id).complete(
+                        MoveResult.REPLICATION_FAIL_TIME_OUT);
+                  }
+                } else {
+                  if (health != NodeState.HEALTHY) {
+                    inflightMoveFuture.get(id).complete(
+                        MoveResult.DELETION_FAIL_NODE_UNHEALTHY);
+                  } else if (a.time < deadline) {
+                    inflightMoveFuture.get(id).complete(
+                        MoveResult.DELETION_FAIL_TIME_OUT);
+                  } else {
+                    inflightMoveFuture.get(id).complete(
+                        MoveResult.COMPLETED);
+                  }

Review comment:
       thanks for pointing out this,i will make a change




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