Skip to content

Commit 11cfb0f

Browse files
cuibo01anoopsjohn
authored andcommitted
HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
Signed-off-by: stack <stack@apache.org> Signed-off-by: Anoop <anoopsamjohn@apache.org>
1 parent 303db63 commit 11cfb0f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,12 @@ public void run() {
636636
Throwable lastException = null;
637637
try {
638638
TraceUtil.addTimelineAnnotation("syncing writer");
639+
long unSyncedFlushSeq = highestUnsyncedTxid;
639640
writer.sync(sf.isForceSync());
640641
TraceUtil.addTimelineAnnotation("writer synced");
642+
if (unSyncedFlushSeq > currentSequence) {
643+
currentSequence = unSyncedFlushSeq;
644+
}
641645
currentSequence = updateHighestSyncedSequence(currentSequence);
642646
} catch (IOException e) {
643647
LOG.error("Error syncing, request close of WAL", e);

0 commit comments

Comments
 (0)