From c93a831e9b681c60bd53d72f2b02138571f5cfd1 Mon Sep 17 00:00:00 2001 From: Tomas Baltrunas Date: Fri, 1 Aug 2025 20:42:04 +0100 Subject: [PATCH] HBASE-29501 IOException in SerialReplicationChecker.canPush causes entries to be pushed out of order --- .../regionserver/SerialReplicationSourceWALReader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java index d1a2e8b57340..26d7934c41b9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java @@ -96,6 +96,11 @@ protected void readWALEntries(WALEntryStream entryStream, WALEntryBatch batch) break; } sleepMultiplier = sleep(sleepMultiplier); + // Always make sure to continue/break from the loop after handling the exception. + // Otherwise we will drop down below into logic to push the entry, + // but since we don't know if the entry can be pushed we may push + // the entry out of order, breaking serial replication guarantees. + continue; } // actually remove the entry. removeEntryFromStream(entry, entryStream, batch);