Skip to content

Commit ce6d55a

Browse files
committed
HBASE-28037 Replication stuck after switching to new WAL but the queue is empty
1 parent 61250ad commit ce6d55a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,8 @@ protected void readWALEntries(WALEntryStream entryStream, WALEntryBatch batch)
241241

242242
private void handleEmptyWALEntryBatch() throws InterruptedException {
243243
LOG.trace("Didn't read any new entries from WAL");
244-
if (logQueue.getQueue(walGroupId).isEmpty()) {
245-
// we're done with current queue, either this is a recovered queue, or it is the special group
246-
// for a sync replication peer and the peer has been transited to DA or S state.
244+
if (logQueue.getQueue(walGroupId).isEmpty() && source.isRecovered()) {
245+
// we're done with current queue, which should be a recovered queue
247246
LOG.debug("Stopping the replication source wal reader");
248247
setReaderRunning(false);
249248
// shuts down shipper thread immediately

0 commit comments

Comments
 (0)