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:14:43 UTC
[hbase] branch branch-2 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
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 11cfb0f HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
11cfb0f is described below
commit 11cfb0f38290be2cdbca5b0b74fbcbb1af3be15c
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 8fb8e83..fb2abfa 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
@@ -636,8 +636,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);