sodonnel commented on code in PR #3963:
URL: https://github.com/apache/ozone/pull/3963#discussion_r1028260147


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaPendingOps.java:
##########
@@ -248,6 +248,7 @@ private boolean completeOp(ContainerReplicaOp.PendingOpType 
opType,
             found = true;
             iterator.remove();
             pendingOpCount.get(op.getOpType()).decrementAndGet();
+            moveManager.notifyContainerOpCompleted(op, containerID);

Review Comment:
   Rather than placing a MoveManager inside ContainerReplicaPending ops, we 
should probably provide a Notify interface where objects can register for a 
call back. At the moment, MoveManager depends on this class and this class 
depends on MoveManager.
   
   If we make only MoveManager have a dependency on this one, then it can 
register itself for a notification when a call comes in. It is also flexible, 
as if we want to register other objects later, we can do that too.
   
   We could have just a single method to call `opCompleted(ContainerReplicaOp 
op, ContainerID containerID, boolean timedOut)` for both timeouts and normal 
completions.



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

Reply via email to