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 8ca6db4b35c..cdebe554752 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 @@ -635,8 +635,12 @@ public class FSHLog extends AbstractFSWAL { Throwable lastException = null; try { TraceUtil.addTimelineAnnotation("syncing writer"); + long unSyncedFlushSeq = highestUnsyncedTxid; writer.sync(sf.isForceSync()); TraceUtil.addTimelineAnnotation("writer synced"); + if (unSyncedFlushSeq > currentSequence) { + currentSequence = unSyncedFlushSeq; + } currentSequence = updateHighestSyncedSequence(currentSequence); } catch (IOException e) { LOG.error("Error syncing, request close of WAL", e);