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 41d95df28219..2c9e4d37bb0b 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; } // arrive here means we can push the entry, record the last sequence id batch.setLastSeqId(Bytes.toString(entry.getKey().getEncodedRegionName()),