HBASE-21721 FSHLog : reduce write#syncs() times (#2217)
Signed-off-by: stack <stack@apache.org> Signed-off-by: Anoop <anoopsamjohn@apache.org>
This commit is contained in:
parent
124af6392c
commit
d492aea3f8
|
@ -635,8 +635,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);
|
||||
|
|
Loading…
Reference in New Issue