You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/09/04 11:02:37 UTC
[GitHub] [pulsar] hangc0276 commented on a diff in pull request #21096: [fix] [broker] Fix isolated group not work problem.
hangc0276 commented on code in PR #21096:
URL: https://github.com/apache/pulsar/pull/21096#discussion_r1314799406
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicy.java:
##########
@@ -179,25 +188,26 @@ private static Pair<Set<String>, Set<String>> getIsolationGroup(
return pair;
}
- private Set<BookieId> getExcludedBookiesWithIsolationGroups(int ensembleSize,
+ @VisibleForTesting
+ Set<BookieId> getExcludedBookiesWithIsolationGroups(int ensembleSize,
Pair<Set<String>, Set<String>> isolationGroups) {
Set<BookieId> excludedBookies = new HashSet<>();
- if (isolationGroups != null && isolationGroups.getLeft().contains(PULSAR_SYSTEM_TOPIC_ISOLATION_GROUP)) {
+ if (isolationGroups != null && isolationGroups.getLeft().contains(PULSAR_SYSTEM_TOPIC_ISOLATION_GROUP)) {
return excludedBookies;
}
try {
if (bookieMappingCache != null) {
- CompletableFuture<Optional<BookiesRackConfiguration>> future =
- bookieMappingCache.get(BookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH);
+ bookieMappingCache.get(BookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH)
+ .thenAccept(opt -> cachedRackConfiguration = opt.orElse(null)).exceptionally(e -> {
+ log.warn("Failed to update the newest bookies rack config.");
Review Comment:
Change the log msg to `log.warn("Failed to update the newest bookies rack config, and use the cached rack configuration: {}", cachedRackConfiguration)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org