Technoboy- commented on code in PR #15843:
URL: https://github.com/apache/pulsar/pull/15843#discussion_r885337995
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/PersistentTopics.java:
##########
@@ -357,12 +357,19 @@ public void unloadTopic(@Suspended final AsyncResponse
asyncResponse, @PathParam
@ApiResponse(code = 403, message = "Don't have admin permission"),
@ApiResponse(code = 404, message = "Topic does not exist"),
@ApiResponse(code = 412, message = "Topic has active
producers/subscriptions")})
- public void deleteTopic(@PathParam("property") String property,
@PathParam("cluster") String cluster,
+ public void deleteTopic(
+ @Suspended final AsyncResponse asyncResponse,
+ @PathParam("property") String property, @PathParam("cluster")
String cluster,
@PathParam("namespace") String namespace, @PathParam("topic")
@Encoded String encodedTopic,
@QueryParam("force") @DefaultValue("false") boolean force,
@QueryParam("authoritative") @DefaultValue("false") boolean
authoritative) {
validateTopicName(property, cluster, namespace, encodedTopic);
- internalDeleteTopic(authoritative, force);
+ internalDeleteTopic(authoritative, force).thenAccept(
+ __ ->
asyncResponse.resume(Response.noContent().build()))
+ .exceptionally(ex -> {
+ resumeAsyncResponseExceptionally(asyncResponse,
ex.getCause());
Review Comment:
if (!isRedirectException(ex)) {
log.error("[{}] Failed to delete topic {}", clientAppId(), topicName,
realCause);
}
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/PersistentTopics.java:
##########
@@ -1011,7 +1012,12 @@ public void deleteTopic(
@ApiParam(value = "Is authentication required to perform this
operation")
@QueryParam("authoritative") @DefaultValue("false") boolean
authoritative) {
validateTopicName(tenant, namespace, encodedTopic);
- internalDeleteTopic(authoritative, force);
+ internalDeleteTopic(authoritative, force).thenAccept(
+ __ ->
asyncResponse.resume(Response.noContent().build()))
+ .exceptionally(ex -> {
+ resumeAsyncResponseExceptionally(asyncResponse,
ex.getCause());
Review Comment:
add log
--
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]