zhaijack commented on a change in pull request #521: Issue 520: Add more http 
endpoint
URL: https://github.com/apache/bookkeeper/pull/521#discussion_r143696889
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/http/DecommissionService.java
 ##########
 @@ -74,20 +73,28 @@ public HttpServiceResponse handle(HttpServiceRequest 
request) throws Exception {
                     BookieSocketAddress bookieSrc = new BookieSocketAddress(
                       bookieSrcString[0], 
Integer.parseInt(bookieSrcString[1]));
 
-                    admin.decommissionBookie(bookieSrc);
-                    admin.close();
+                    Thread thread = new Thread() {
+                        @Override
+                        public void run() {
+                            try {
+                                bka.decommissionBookie(bookieSrc);
+                            } catch (Exception e) {
+                                LOG.error("Error handling decommissionBookie: 
{} with exception {}", bookieSrc, e);
+                            }
+                        }
+                    };
+
+                    thread.run();
 
 Review comment:
   Thanks. will change it.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to