HBASE-19797 Operator priority leads to wrong logic in ReplicationSourceWALReader


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3a66f155
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3a66f155
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3a66f155

Branch: refs/heads/HBASE-19064
Commit: 3a66f155577e517ad836f124271a303779e6037f
Parents: 3b638f7
Author: zhangduo <zhang...@apache.org>
Authored: Mon Jan 15 15:20:13 2018 +0800
Committer: zhangduo <zhang...@apache.org>
Committed: Mon Jan 15 18:10:50 2018 +0800

----------------------------------------------------------------------
 .../replication/regionserver/ReplicationSourceWALReader.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3a66f155/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
index e2201e5..90a421d 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
@@ -204,8 +204,8 @@ public class ReplicationSourceWALReader extends Thread {
   // (highly likely we've closed the current log), we've hit the max retries, 
and autorecovery is
   // enabled, then dump the log
   private void handleEofException(IOException e) {
-    if (e instanceof EOFException ||
-        e.getCause() instanceof EOFException && logQueue.size() > 1 && 
this.eofAutoRecovery) {
+    if ((e instanceof EOFException || e.getCause() instanceof EOFException) &&
+      logQueue.size() > 1 && this.eofAutoRecovery) {
       try {
         if (fs.getFileStatus(logQueue.peek()).getLen() == 0) {
           LOG.warn("Forcing removal of 0 length log in queue: " + 
logQueue.peek());

Reply via email to