XComp commented on a change in pull request #18749:
URL: https://github.com/apache/flink/pull/18749#discussion_r806878952
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/cleanup/DispatcherResourceCleanerFactory.java
##########
@@ -101,13 +101,13 @@ public ResourceCleaner createLocalResourceCleaner(
@Override
public ResourceCleaner createGlobalResourceCleaner(
ComponentMainThreadExecutor mainThreadExecutor) {
-
return DefaultResourceCleaner.forGloballyCleanableResources(
mainThreadExecutor, cleanupExecutor, retryStrategy)
- .withPrioritizedCleanup(jobManagerRunnerRegistry)
+
.withPrioritizedCleanup(ofLocalResource(jobManagerRunnerRegistry))
.withRegularCleanup(jobGraphWriter)
Review comment:
> These question are primarily based on my assumption that the only
benefit of duplicating everything is that it allows us to cleanup things in a
specific order that local cleanup -> global cleanup wouldn't provide.
The global cleanup of the `BlobServer` and the `DefaultJobGraphStore` clean
the local data and global data atomically. This wouldn't be possible if we say
that we let the local data being handled by the `localCleanupAsync` call and
global data being handled by the `globalCleanupAsync` call. It would leave us
in an intermediate inconsistent state.
That's the reason why we don't add a dependency between local cleanup and
global cleanup. The individual resource has to take care of the cleanup of each
of the cleanups individually.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]