HBASE-19797 Operator priority leads to wrong logic in ReplicationSourceWALReader

This commit is contained in:
zhangduo 2018-01-15 15:20:13 +08:00
parent 204a4539c4
commit e014e5f8ef
1 changed files with 2 additions and 2 deletions

View File

@ -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());