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/15 16:22:00 UTC

[GitHub] [pulsar] lhotari commented on a change in pull request #9308: Wait for broker port listeners to shutdown in BrokerService.close

lhotari commented on a change in pull request #9308:
URL: https://github.com/apache/pulsar/pull/9308#discussion_r594484993



##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -120,13 +120,18 @@
         category = CATEGORY_SERVER,
         doc = "The port for serving binary protobuf requests"
     )
-
     private Optional<Integer> brokerServicePort = Optional.of(6650);
     @FieldContext(
         category = CATEGORY_SERVER,
         doc = "The port for serving tls secured binary protobuf requests"
     )
     private Optional<Integer> brokerServicePortTls = Optional.empty();
+    @FieldContext(
+            category = CATEGORY_SERVER,
+            doc = "The maximum duration (in seconds) to wait for each broker service network port to close "
+                    + "at broker service shutdown. No waiting will take place when the value is set to <= 0."
+    )
+    private int brokerServicePortCloseTimeoutInSeconds = 2;

Review comment:
       @merlimat I'm a bit unsure how to handle this. I created a separate experiment in https://github.com/lhotari/pulsar/commit/2999b2b294066f018a01db01fa77b27eb0914ef4 where there wouldn't be a separate setting for waiting for broker port listeners to shutdown. Would that type of approach make sense?
   I didn't find other ways to make the shutdown use the `brokerShutdownTimeoutMs` setting.
   I have some concerns of that type of approach since the behavior of shutdown would be different if the port listener shutdown is asynchronous. Is that a valid concern?




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