bharathv commented on a change in pull request #3204:
URL: https://github.com/apache/hbase/pull/3204#discussion_r624902046



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
##########
@@ -641,8 +641,8 @@ public void removePeer(String id) {
             "and that replication on this peer may not be caught up. peerId=" 
+ id);
       }
       for (ReplicationSourceInterface toRemove : srcToRemove) {
-        toRemove.terminate(terminateMessage);
         closeQueue(toRemove);
+        toRemove.terminate(terminateMessage);

Review comment:
       >  One alternative I can think of is having a new function other peer 
Removed which will be called just for this handling and doing the right cleanup 
and we can terminate the thread at the end of the function.
   
   You have a patch for this? Only concern is that creates two versions of 
"peerRemoved()" functions and they can diverge, if we can avoid that some way, 
we are good to go.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to