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:16:15 UTC

[hbase] branch branch-2.3 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 branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


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

commit 700fc492f64c051acb2053f74661bbd6d3cb120b
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 290d4cd..2aae540 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
@@ -596,8 +596,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);