HBASE-21721 reduce write#syncs() times (#2220)
Signed-off-by: Anoop <anoopsamjohn@apache.org> Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
839ce8e560
commit
57e4144ddf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue