You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2020/08/08 04:10:18 UTC

[hbase] branch master updated: HBASE-21721 FSHLog : reduce write#syncs() times (#2217)

This is an automated email from the ASF dual-hosted git repository.

anoopsamjohn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new d492aea  HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
d492aea is described below

commit d492aea3f8f21b5e319e129b9d229a836d2ab6e9
Author: Bo Cui <cu...@163.com>
AuthorDate: Sat Aug 8 12:09:48 2020 +0800

    HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
    
    Signed-off-by: stack <st...@apache.org>
    Signed-off-by: Anoop <an...@apache.org>
---
 .../main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java    | 4 ++++
 1 file changed, 4 insertions(+)

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 8ca6db4..cdebe55 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<Writer> {
           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);