virajjasani commented on issue #1006: HBASE-23045.currentPath may be stitched 
in a loop in replication source code.
URL: https://github.com/apache/hbase/pull/1006#issuecomment-574241320
 
 
   Thanks for the fix @Gkkkk302 
   Could you please also validate branch-1 patch to ensure if we can get this 
fix to branch-1 since it's good to have this fixed as part of 1.6 release.
   Thanks
   
   branch-1 patch:
   
   ```
   diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
   index 5acb70922f..a26bbd00cd 100644
   --- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
   +++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
   @@ -938,8 +938,9 @@ public class ReplicationSource extends Thread implements 
ReplicationSourceInterf
            Path p = rs.getPath();
            FileStatus[] logs = fs.listStatus(p);
            for (FileStatus log : logs) {
   -          p = new Path(p, log.getPath().getName());
   -          if (p.getName().equals(path.getName())) {
   +          String logName = log.getPath().getName();
   +          if (logName.equals(path.getName())) {
   +            p = new Path(p, log.getPath().getName());
                LOG.info("Log " + p.getName() + " found at " + p);
                return p;
              }
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to