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 ddaa8b45c6a..bd5b8244972 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 @@ -1317,8 +1317,12 @@ public class FSHLog implements WAL { Throwable lastException = null; try { Trace.addTimelineAnnotation("syncing writer"); + long unSyncedFlushSeq = highestUnsyncedSequence; writer.sync(takeSyncFuture.isForceSync()); Trace.addTimelineAnnotation("writer synced"); + if (unSyncedFlushSeq > currentSequence) { + currentSequence = unSyncedFlushSeq; + } currentSequence = updateHighestSyncedSequence(currentSequence); } catch (IOException e) { LOG.error("Error syncing, request close of WAL", e);