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

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


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

commit 4c6c4ff4301a99226640ce19a77dc21f6f8725a6
Author: Gkkkk302 <[email protected]>
AuthorDate: Sat Jan 11 13:09:19 2020 +0800

    HBASE-23045 currentPath may be stitched in a loop in replication source 
code. (#1006)
    
    Signed-off-by: stack <[email protected]>
    Signed-off-by: Viraj Jasani <[email protected]>
---
 .../hadoop/hbase/replication/regionserver/ReplicationSource.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 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 ff79976..b13f838 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
@@ -801,9 +801,9 @@ public class ReplicationSource extends Thread
                 Path p = rs.getPath();
                 FileStatus[] logs = fs.listStatus(p);
                 for (FileStatus log : logs) {
-                  p = new Path(p, log.getPath().getName());
-                  if (p.getName().equals(currentPath.getName())) {
-                    currentPath = p;
+                  String logName = log.getPath().getName();
+                  if (logName.equals(currentPath.getName())) {
+                    currentPath = new Path(p, logName);
                     LOG.info("Log " + currentPath.getName() + " found at " + 
currentPath);
                     // Open the log at the new location
                     this.openReader(sleepMultiplier);

Reply via email to