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 e6718c068296..83b3c588d52d 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 @@ -241,9 +241,8 @@ protected void readWALEntries(WALEntryStream entryStream, WALEntryBatch batch) private void handleEmptyWALEntryBatch() throws InterruptedException { LOG.trace("Didn't read any new entries from WAL"); - if (logQueue.getQueue(walGroupId).isEmpty()) { - // we're done with current queue, either this is a recovered queue, or it is the special group - // for a sync replication peer and the peer has been transited to DA or S state. + if (logQueue.getQueue(walGroupId).isEmpty() && source.isRecovered()) { + // we're done with current queue, which should be a recovered queue LOG.debug("Stopping the replication source wal reader"); setReaderRunning(false); // shuts down shipper thread immediately