This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new 66f1658  HBASE-23045 currentPath may be stitched in a loop in 
replication source code. (#1006)
66f1658 is described below

commit 66f16581671ded7c8471a90a7983fdcfc8d9787e
Author: Gkkkk302 <49739485+gkkkk...@users.noreply.github.com>
AuthorDate: Tue Jan 28 23:15:25 2020 +0530

    HBASE-23045 currentPath may be stitched in a loop in replication source 
code. (#1006)
    
    Co-authored-by: Viraj Jasani <vjas...@apache.org>
    Signed-off-by: Viraj Jasani <vjas...@apache.org>
---
 .../hadoop/hbase/replication/regionserver/ReplicationSource.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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 c586142..e5596be 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;
           }

Reply via email to