Skip to content

Commit

Permalink
fix: Avoid double counting elapsed time.
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoyiPeng committed Jan 18, 2022
1 parent 6c33d13 commit e4685a3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,9 @@ public FlushDataService(String name, Logger logger) {
long start = System.currentTimeMillis();
DLedgerMmapFileStore.this.dataFileList.flush(0);
DLedgerMmapFileStore.this.indexFileList.flush(0);
if (DLedgerUtils.elapsed(start) > 500) {
logger.info("Flush data cost={} ms", DLedgerUtils.elapsed(start));
long elapsed;
if ((elapsed = DLedgerUtils.elapsed(start)) > 500) {
logger.info("Flush data cost={} ms", elapsed);
}

if (DLedgerUtils.elapsed(lastCheckPointTimeMs) > dLedgerConfig.getCheckPointInterval()) {
Expand Down

0 comments on commit e4685a3

Please sign in to comment.