diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java index 142ab63..edf698e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java @@ -1042,6 +1042,12 @@ public class FSHLog extends AbstractFSWAL { } catch (Exception e) { // Failed append. Record the exception. this.exception = e; + // invoking cleanupOutstandingSyncsOnException when append failed with exception, + // it will cleanup existing sync requests recorded in syncFutures but not offered to SyncRunner yet, + // so there won't be any sync future left over if no further truck published to disruptor. + cleanupOutstandingSyncsOnException(sequence, + this.exception instanceof DamagedWALException ? this.exception + : new DamagedWALException("On sync", this.exception)); // Return to keep processing events coming off the ringbuffer return; } finally {