poorbarcode commented on code in PR #19737:
URL: https://github.com/apache/pulsar/pull/19737#discussion_r1155330077
##########
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) {
+ final PersistentSubscription sub = subscriptions.get(subName);
+ if (sub == null) {
+ return CompletableFuture.failedFuture(new
RestException(Response.Status.NOT_FOUND,
Review Comment:
> The odds are that he will simply use this exception. This will create a
large amount of technical debt.
No. Neither of these exceptions should occur because users will not try to
unload a sub that does not exist, nor do they try to unload an unsupported Sub
which named `__compaction`.
As mentioned above, I share your feeling that the use of an `RestException`
exception here is unreasonable, and has now been replaced with a dedicated
exception.
--
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]