michaeljmarshall commented on a change in pull request #12215:
URL: https://github.com/apache/pulsar/pull/12215#discussion_r717210724
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -632,25 +632,29 @@ protected void
internalDeletePartitionedTopic(AsyncResponse asyncResponse, boole
return;
}
}
+ // Only tries to delete the authentication policies for
partitioned topic when all its partitions are
+ // successfully deleted
+
pulsar().getBrokerService().deleteTopicAuthenticationWithRetry(topicName.toString());
Review comment:
Are we able to make an atomic update to ZooKeeper here? The semantics
here are at-most-once, so failure would lead to corrupted zk state that will
never be cleaned up.
Note that with the current design, it is possible for this method to succeed
while the `asyncResponse` completes without exception.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -632,25 +632,29 @@ protected void
internalDeletePartitionedTopic(AsyncResponse asyncResponse, boole
return;
}
}
+ // Only tries to delete the authentication policies for
partitioned topic when all its partitions are
+ // successfully deleted
+
pulsar().getBrokerService().deleteTopicAuthenticationWithRetry(topicName.toString());
Review comment:
Thanks for clarifying. I should have been more specific. I was
referencing atomicity for both this update and the
`deletePartitionedTopicAsync` update. My only concern is that failure could
lead to corrupt state. I am not familiar enough with Pulsar's interactions with
ZK to speak authoritatively here, which is why I asked @eolivelli to take a
look.
--
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]