Skip to content

Commit

Permalink
Fix potential bug getting stats and remove unnecessary error log (apa…
Browse files Browse the repository at this point in the history
…che#10500)

Co-authored-by: Jerry Peng <jerryp@splunk.com>
  • Loading branch information
2 people authored and eolivelli committed May 11, 2021
1 parent 418fb8b commit 8d2342c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ public void initializeComplete() {

@Override
public void initializeFailed(ManagedLedgerException e) {
log.error("[{}] Failed to initialize managed ledger: {}", name, e.getMessage());
if (config.isCreateIfMissing()) {
log.error("[{}] Failed to initialize managed ledger: {}", name, e.getMessage());
}

// Clean the map if initialization fails
ledgers.remove(name, future);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ private void createPersistentTopic(final String topic, boolean createIfMissing,
return;
}

if (!checkMaxTopicsPerNamespace(topicName, 1, topicFuture)) {
if (createIfMissing && !checkMaxTopicsPerNamespace(topicName, 1, topicFuture)) {
return;
}

Expand Down

0 comments on commit 8d2342c

Please sign in to comment.