XComp commented on a change in pull request #18749: URL: https://github.com/apache/flink/pull/18749#discussion_r806241092
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/cleanup/DispatcherResourceCleanerFactoryTest.java ########## @@ -192,7 +192,6 @@ private void assertLocalCleanupNotTriggered() { assertThat(jobManagerRunnerRegistryLocalCleanupFuture).isNotDone(); assertThat(jobGraphWriterLocalCleanupFuture).isNotDone(); assertThat(blobServer.getLocalCleanupFuture()).isNotDone(); - assertThat(jobManagerMetricGroup.numRegisteredJobMetricGroups()).isEqualTo(1); Review comment: There are also cases where the local and global cleanup shall be performed in a synchronized fashion (e.g. `BlobServer`) which required to have the two interfaces (i.e. the two different types of cleanup methods) being operatable independent from each other. I updated the JavaDoc of `GloballyCleanableResource` and `LocallyCleanableResource` to reflect this. The decision on what method to call is now based on whether the job reaches a locally terminal or globally terminal state. I think that makes the intention of these two interfaces clearer. WDYT? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org