poorbarcode commented on code in PR #19737:
URL: https://github.com/apache/pulsar/pull/19737#discussion_r1155090950
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -429,6 +431,25 @@ public AtomicLong getPendingWriteOps() {
return pendingWriteOps;
}
+ public CompletableFuture<Void> unloadSubscription(String subName) {
Review Comment:
- `create new sub` & `unload sub`: `create a new sub` is executed only when
there is no sub, and `unload sub` is performed only when there is a sub. No
concurrent calls can occur
- `unload sub` & `unload sub`: I added a concurrent Map to prevent reentrant
- `unload sub` & `close topic`: use `PersistentTopic.lock` to make sure it's
correct
I missed the `2&3` two scenes earlier. Thanks for reminding me
--
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]