Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

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.

(cherry picked from commit a358430)
  • Loading branch information
aloyszhang authored and codelipenghui committed Nov 10, 2020
1 parent bcb97d1 commit 7d00d0b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,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 7d00d0b

Please sign in to comment.