Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4872#discussion_r147149524
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java
 ---
    @@ -239,7 +239,15 @@ public void shutdown() {
     
                        if (queryService != null) {
                                stopTimeout = new FiniteDuration(1L, 
TimeUnit.SECONDS);
    -                           stopFuture = 
Patterns.gracefulStop(queryService, stopTimeout);
    +
    +                           try {
    +                                   stopFuture = 
Patterns.gracefulStop(queryService, stopTimeout);
    +                           } catch (IllegalStateException ignored) {
    +                                   // this can happen if the underlying 
actor system has been stopped before shutting
    +                                   // the metric registry down
    +                                   // TODO: Pull the MetricQueryService 
actor out of the MetricRegistry
    +                                   LOG.debug("Cannot gracefully stop the 
metric query service actor.");
    --- End diff --
    
    include exception


---

Reply via email to