[ https://issues.apache.org/jira/browse/HBASE-23045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17013387#comment-17013387 ]
Viraj Jasani commented on HBASE-23045: -------------------------------------- [~gk_coder] merged branch-1.2 PR. The patch is not directly applied to branch-1, it requires very minor change. Although we can make the change and merge, if you could confirm the fix with your manual tests, that would be great since we don't have unit test for this change. Also, please note that branch-1.2 is EOL'ed long back. branch-1 patch: {code:java} 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; }{code} > currentPath may be stitched in a loop in replication source code. > ------------------------------------------------------------------ > > Key: HBASE-23045 > URL: https://issues.apache.org/jira/browse/HBASE-23045 > Project: HBase > Issue Type: Bug > Components: Replication > Affects Versions: 1.2.6.1 > Reporter: kangkang.guo > Assignee: kangkang.guo > Priority: Critical > Fix For: 1.2.6.1, 1.6.0, 1.3.7, 1.4.13 > > Attachments: HBASE-23045.branch-1.2.0001.patch > > > When the openReader encounters a FileNotFoundException, we may go to all > possible directories to find the current hlog. When found, the path may be > wrong, and it is looped together. -- This message was sent by Atlassian Jira (v8.3.4#803005)