anmolnar commented on code in PR #7617:
URL: https://github.com/apache/hbase/pull/7617#discussion_r3080238529


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java:
##########
@@ -866,4 +866,24 @@ public long getTotalReplicatedEdits() {
   long getSleepForRetries() {
     return sleepForRetries;
   }
+
+  void restartShipper(String walGroupId, ReplicationSourceShipper oldWorker) {
+    workerThreads.compute(walGroupId, (key, current) -> {
+      if (current != oldWorker) {
+        return current; // already replaced

Review Comment:
   Okay, we can leave this safety check here, but still unclear to me that a 
single `walGroupId` is strictly handled by a single thread in the worker pool. 
How is it possible that single thread calls for restart two times?
   
   I think what you say "multiple threads trigger restart around the same time" 
doesn't seem to be possible, because what I mentioned above: exactly one thread 
is dealing with a `walGroupId`.



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

Reply via email to