shibd commented on code in PR #15760:
URL: https://github.com/apache/pulsar/pull/15760#discussion_r884387615
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java:
##########
@@ -379,10 +388,20 @@ public Set<String>
getNamespaceReplicationClusters(@PathParam("property") String
@ApiResponse(code = 404, message = "Property or cluster or
namespace doesn't exist"),
@ApiResponse(code = 409, message = "Peer-cluster can't be part of
replication-cluster"),
@ApiResponse(code = 412, message = "Namespace is not global or
invalid cluster ids") })
- public void setNamespaceReplicationClusters(@PathParam("property") String
property,
- @PathParam("cluster") String cluster, @PathParam("namespace")
String namespace, List<String> clusterIds) {
+ public void setNamespaceReplicationClusters(@Suspended AsyncResponse
asyncResponse,
+ @PathParam("property") String
property,
+ @PathParam("cluster") String
cluster,
+ @PathParam("namespace") String
namespace, List<String> clusterIds) {
validateNamespaceName(property, cluster, namespace);
- internalSetNamespaceReplicationClusters(clusterIds);
+ internalSetNamespaceReplicationClusters(clusterIds)
+ .thenAccept(asyncResponse::resume)
+ .exceptionally(e -> {
+ Throwable throwable =
FutureUtil.unwrapCompletionException(e);
Review Comment:
Consider printing the original exception log. Thought about it, It should be
better to print the full exception stack. Fixed.
--
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]