You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ha...@apache.org on 2023/09/28 01:06:53 UTC
[hbase] branch branch-2.5 updated: HBASE-28037 Replication stuck after switching to new WAL but the queue is empty (#5375)
This is an automated email from the ASF dual-hosted git repository.
haxiaolin pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new a3abc5244bd HBASE-28037 Replication stuck after switching to new WAL but the queue is empty (#5375)
a3abc5244bd is described below
commit a3abc5244bd04e0054060807f9bcb83c8e242f96
Author: Xiaolin Ha <ha...@apache.org>
AuthorDate: Thu Sep 28 09:05:03 2023 +0800
HBASE-28037 Replication stuck after switching to new WAL but the queue is empty (#5375)
Signed-off-by: Duo Zhang <zh...@apache.org>
---
.../hbase/replication/regionserver/ReplicationSourceWALReader.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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 e6718c06829..83b3c588d52 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 @@ class ReplicationSourceWALReader extends Thread {
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