Skip to content

Commit d492aea

Browse files
authored
HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
Signed-off-by: stack <[email protected]> Signed-off-by: Anoop <[email protected]>
1 parent 124af63 commit d492aea

File tree

1 file changed

+4
-0
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal

1 file changed

+4
-0
lines changed

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
@@ -635,8 +635,12 @@ public void run() {
635635
Throwable lastException = null;
636636
try {
637637
TraceUtil.addTimelineAnnotation("syncing writer");
638+
long unSyncedFlushSeq = highestUnsyncedTxid;
638639
writer.sync(sf.isForceSync());
639640
TraceUtil.addTimelineAnnotation("writer synced");
641+
if (unSyncedFlushSeq > currentSequence) {
642+
currentSequence = unSyncedFlushSeq;
643+
}
640644
currentSequence = updateHighestSyncedSequence(currentSequence);
641645
} catch (IOException e) {
642646
LOG.error("Error syncing, request close of WAL", e);

0 commit comments

Comments
 (0)