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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]