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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to