You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/22 08:07:21 UTC
[GitHub] [pulsar] lhotari commented on a change in pull request #9308: Wait for the async broker port listener close operations to complete at shutdown
lhotari commented on a change in pull request #9308:
URL: https://github.com/apache/pulsar/pull/9308#discussion_r598495139
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
##########
@@ -296,16 +299,31 @@ public MetadataStoreExtended createConfigurationMetadataStore() throws MetadataS
.build());
}
+ @Override
+ public void close() throws PulsarServerException {
+ try {
+ closeAsync().get();
+ } catch (PulsarServerException e) {
+ throw e;
+ } catch (ExecutionException e) {
+ if (e.getCause() instanceof PulsarServerException) {
+ throw (PulsarServerException) e.getCause();
+ } else {
+ throw new PulsarServerException(e.getCause());
+ }
+ } catch (Exception e) {
+ throw new PulsarServerException(e);
+ }
+ }
+
/**
* Close the current pulsar service. All resources are released.
*/
- @Override
- public void close() throws PulsarServerException {
+ public CompletableFuture<Void> closeAsync() throws PulsarServerException {
Review comment:
In this case making that change wouldn't make an actual difference since `closeAsync` isn't part of a public API exposed outside of Pulsar.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org