merlimat commented on a change in pull request #11330:
URL: https://github.com/apache/pulsar/pull/11330#discussion_r670661583
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ResourceQuotasBase.java
##########
@@ -87,13 +84,9 @@ protected void
internalSetNamespaceBundleResourceQuota(String bundleRange, Resou
NamespaceBundle nsBundle = validateNamespaceBundleRange(namespaceName,
policies.bundles, bundleRange);
try {
-
pulsar().getLocalZkCacheService().getResourceQuotaCache().setQuota(nsBundle,
quota);
+
pulsar().getBrokerService().getBundlesQuotas().setResourceQuota(nsBundle,
quota).join();
log.info("[{}] Successfully set resource quota for namespace
bundle {}", clientAppId(),
nsBundle.toString());
- } catch (KeeperException.NoNodeException e) {
- log.warn("[{}] Failed to set resource quota for namespace bundle
{}: concurrent modification",
- clientAppId(), nsBundle.toString());
- throw new RestException(Status.CONFLICT, "Concurrent modification
on namespace bundle quota");
Review comment:
The message and return code are actually wrong, and we cannot have a
`NoNodeException` in this case because the write will use set or create
depending on the case.
--
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]