This is an automated email from the ASF dual-hosted git repository.
anoopsamjohn pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new 57e4144 HBASE-21721 reduce write#syncs() times (#2220)
57e4144 is described below
commit 57e4144ddf8f7486b0c1d5d40a46ecb7733f2b95
Author: Bo Cui <[email protected]>
AuthorDate: Mon Aug 10 20:43:14 2020 +0800
HBASE-21721 reduce write#syncs() times (#2220)
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 ddaa8b4..bd5b824 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
@@ -1317,8 +1317,12 @@ public class FSHLog implements WAL {
Throwable lastException = null;
try {
Trace.addTimelineAnnotation("syncing writer");
+ long unSyncedFlushSeq = highestUnsyncedSequence;
writer.sync(takeSyncFuture.isForceSync());
Trace.addTimelineAnnotation("writer synced");
+ if (unSyncedFlushSeq > currentSequence) {
+ currentSequence = unSyncedFlushSeq;
+ }
currentSequence = updateHighestSyncedSequence(currentSequence);
} catch (IOException e) {
LOG.error("Error syncing, request close of WAL", e);