bharathv commented on a change in pull request #2908:
URL: https://github.com/apache/hbase/pull/2908#discussion_r566273203



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
##########
@@ -248,7 +248,7 @@ private void handleEmptyWALEntryBatch() throws 
InterruptedException {
   // enabled, then dump the log
   private void handleEofException(IOException e) {
     if ((e instanceof EOFException || e.getCause() instanceof EOFException) &&
-      logQueue.size() > 1 && this.eofAutoRecovery) {
+      (source.isRecovered() || logQueue.size() > 1) && this.eofAutoRecovery) {

Review comment:
       On a related note, should we add a source and global metric counter to 
track the number of 0 size files dequeued? Seems more common than we thought, 
easy to monitor may be..

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java
##########
@@ -248,7 +248,7 @@ private void handleEmptyWALEntryBatch() throws 
InterruptedException {
   // enabled, then dump the log
   private void handleEofException(IOException e) {
     if ((e instanceof EOFException || e.getCause() instanceof EOFException) &&
-      logQueue.size() > 1 && this.eofAutoRecovery) {
+      (source.isRecovered() || logQueue.size() > 1) && this.eofAutoRecovery) {

Review comment:
       nice find, mind adding a quick comment since this is a subtle behavior?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to