bharathv commented on a change in pull request #934: HBASE-23568: Improve 
Threading of Replication
URL: https://github.com/apache/hbase/pull/934#discussion_r373907184
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 ##########
 @@ -304,31 +318,56 @@ private void initializeWALEntryFilter(UUID 
peerClusterId) {
     this.walEntryFilter = new ChainWALEntryFilter(filters);
   }
 
-  private void tryStartNewShipper(String walGroupId, 
PriorityBlockingQueue<Path> queue) {
-    workerThreads.compute(walGroupId, (key, value) -> {
-      if (value != null) {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug(
-              "{} Someone has beat us to start a worker thread for wal group 
{}",
-              logPeerId(), key);
-        }
-        return value;
-      } else {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("{} Starting up worker for wal group {}", logPeerId(), 
key);
+  /**
+   * Synchronized method so that only one item is inserted at a time. Should 
be the only place that
 
 Review comment:
   This change seems unnecessary to me (unless I'm misunderstanding something). 
You are making all the enquelog() requests serial with this change. This 
indirectly affects the MTTR of failed nodes too (codepaths with 
NodeFailoverWorker enqueing WALs after an RS crash).
   
   Whats the benefit of making it synchronized? (apart from code readability).

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


With regards,
Apache Git Services

Reply via email to