nodece commented on a change in pull request #14087:
URL: https://github.com/apache/pulsar/pull/14087#discussion_r800293940



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java
##########
@@ -168,10 +168,19 @@ public void getLeaderBroker(@Suspended final 
AsyncResponse asyncResponse) {
             @ApiResponse(code = 404, message = "Configuration not found"),
             @ApiResponse(code = 412, message = "Invalid dynamic-config value"),
             @ApiResponse(code = 500, message = "Internal server error") })
-    public void updateDynamicConfiguration(@PathParam("configName") String 
configName,
-                                           @PathParam("configValue") String 
configValue) throws Exception {
-        validateSuperUserAccess();
-        persistDynamicConfiguration(configName, configValue);
+    public void updateDynamicConfiguration(@Suspended AsyncResponse 
asyncResponse,
+                                           @PathParam("configName") String 
configName,
+                                           @PathParam("configValue") String 
configValue) {
+        validateSuperUserAccessAsync()
+                .thenCompose(__ -> persistDynamicConfiguration(configName, 
configValue))
+                .thenAccept(__ -> {
+                    LOG.info("[{}] Updated Service configuration {}/{}", 
clientAppId(), configName, configValue);
+                    asyncResponse.resume(Response.ok().build());
+                }).exceptionally(ex -> {
+                    LOG.error("[{}] Failed to update configuration {}/{}, {}", 
clientAppId(), configName, configValue,

Review comment:
       ```suggestion
                       LOG.error("[{}] Failed to update configuration {}/{}", 
clientAppId(), configName, configValue, ex);
   ```




-- 
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]


Reply via email to