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/08/06 17:09:18 UTC

[GitHub] [ozone] lokeshj1703 commented on a change in pull request #2488: HDDS-5253. make balancer HA aware

lokeshj1703 commented on a change in pull request #2488:
URL: https://github.com/apache/ozone/pull/2488#discussion_r684383691



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -664,11 +690,10 @@ private void updateMoveIfNeeded(final boolean isUnhealthy,
    * add a move action for a given container.
    *
    * @param cid Container to move
-   * @param srcDn datanode to move from
-   * @param targetDn datanode to move to
+   * @param mp MoveDataNodePair which contains source and target datanodes
    */
   public CompletableFuture<MoveResult> move(ContainerID cid,

Review comment:
       We should also fail move if ReplicationManager is not running or is not a leader?

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
##########
@@ -610,50 +630,56 @@ private void updateMoveIfNeeded(final boolean isUnhealthy,
      */
 
     if (isSource && isInflightReplication) {
-      inflightMoveFuture.get(id).complete(
-          MoveResult.UNEXPECTED_REMOVE_SOURCE_AT_INFLIGHT_REPLICATION);
-      inflightMove.remove(id);
-      inflightMoveFuture.remove(id);
+      if (hasMoveFuture) {
+        inflightMoveFuture.get(id).complete(
+            MoveResult.UNEXPECTED_REMOVE_SOURCE_AT_INFLIGHT_REPLICATION);
+        inflightMoveFuture.remove(id);
+      }

Review comment:
       We can add a new private function for this logic since it is used in multiple places.




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