codelipenghui commented on a change in pull request #6637: [pulsar-broker]
Implement AutoSubscriptionCreation by namespace override
URL: https://github.com/apache/pulsar/pull/6637#discussion_r405435396
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -571,23 +572,80 @@ protected void
internalSetAutoTopicCreation(AsyncResponse asyncResponse, AutoTop
try {
// Write back the new policies into zookeeper
globalZk().setData(path(POLICIES,
namespaceName.toString()),
-
jsonMapper().writeValueAsBytes(policiesNode.getKey()),
policiesNode.getValue().getVersion());
- policiesCache().invalidate(path(POLICIES,
namespaceName.toString()));
+
jsonMapper().writeValueAsBytes(policiesNode.getKey()),
policiesNode.getValue().getVersion(),
+ (rc, path1, ctx, stat) -> {
+ if (rc ==
KeeperException.Code.OK.intValue()) {
+
policiesCache().invalidate(path(POLICIES, namespaceName.toString()));
Review comment:
Looks should complete the `asyncResponse` here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services