You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/17 10:46:43 UTC
[GitHub] [flink] dmvk commented on pull request #18169: [FLINK-25277] add shutdown hook to stop TaskExecutor on SIGTERM
dmvk commented on pull request #18169:
URL: https://github.com/apache/flink/pull/18169#issuecomment-1014381837
> Do you have an alternative approach in mind? (locks and counter?) I am not particularly attached to the Phaser approach. Its advantage is that it can be used for this problem without requiring additional objects. Its disadvantage is that it covers a far greater problem space and so the method names are a bit misleading for this scenario. (register -> count up, arriveAndDeregister -> count down, arriveAndAwaitAdvance -> countDown and wait for count to reach 0 before continuing)
I'd probably go with some kind of tracking mechanism based on the `ConcurrentMap` + `CompletableFutures`, which of course have a higher memory footprint, but should be easier to reason about / debug (this might be bit biased).
The current approach is good, we should keep it.
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org