Skip to content

Commit

Permalink
add elapsedMs for create ledger in log (apache#8473)
Browse files Browse the repository at this point in the history
### Motivation
Fix log only has placeholder problem.
  • Loading branch information
aloyszhang authored Nov 8, 2020
1 parent 570d60f commit a358430
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@ private synchronized void internalAsyncAddEntry(OpAddEntry addOperation) {
long elapsedMs = System.currentTimeMillis() - this.lastLedgerCreationInitiationTimestamp;
if (elapsedMs > TimeUnit.SECONDS.toMillis(2 * config.getMetadataOperationsTimeoutSeconds())) {
log.info("[{}] Ledger creation was initiated {} ms ago but it never completed" +
" and creation timeout task didn't kick in as well. Force to fail the create ledger operation ...");
" and creation timeout task didn't kick in as well. Force to fail the create ledger operation.",
name, elapsedMs);
this.createComplete(Code.TimeoutException, null, null);
}
}
Expand Down

0 comments on commit a358430

Please sign in to comment.