lhotari commented on code in PR #24762:
URL: https://github.com/apache/pulsar/pull/24762#discussion_r2362682379
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -2907,5 +2908,16 @@ protected CompletableFuture<Set<String>>
internalGetNamespaceAllowedClustersAsyn
.thenApply(policies -> policies.allowed_clusters);
}
-
+ private BundlesData getDefaultBundleData() {
+ Optional<Policies> nsPolicies;
+ try {
+ nsPolicies = namespaceResources().getPolicies(namespaceName);
Review Comment:
Oh yes, I see that now. I guess one way to prepare for this would be to
already add a `getDefaultBundleDataAsync` method and then have the
`getDefaultBundleData` delegate to the async method. That's a pattern that has
been used in other locations.
Btw. One surprising detail about getPolicies and getPoliciesAsync method is
that the behavior is different. getPoliciesAsync will use the metadata cache,
but getPolicies will always make a call to get the content:
https://github.com/apache/pulsar/blob/936afecede8374b14d13e9d48e9372fec1c27447/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/NamespaceResources.java#L121-L138
It's not very great that the behavior is different.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]