This is an automated email from the ASF dual-hosted git repository.
anoopsamjohn pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 3a38e82 HBASE-21721 reduce write#syncs() times (#2093)
3a38e82 is described below
commit 3a38e82b53ce67181b68485cd7c4991193be3494
Author: Bo Cui <[email protected]>
AuthorDate: Mon Aug 10 20:42:27 2020 +0800
HBASE-21721 reduce write#syncs() times (#2093)
Signed-off-by: Anoop <[email protected]>
Signed-off-by: stack <[email protected]>
---
.../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 1794a25..442d876 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
@@ -584,8 +584,12 @@ public class FSHLog extends AbstractFSWAL<Writer> {
Throwable lastException = null;
try {
TraceUtil.addTimelineAnnotation("syncing writer");
+ long unSyncedFlushSeq = highestUnsyncedTxid;
writer.sync(takeSyncFuture.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);