Hi Team,

I have 2 operators with `forceNonParallel`:
- Lock generator
- Lock remover
I need them to be located on the same JVM.
My testing shows that if I put them to the same slotSharingGroup (or leave
both of them as "default"), then they will be running on the same task
manager slot. This ensures that they are running in the same JVM, and I can
use JVM static locks to share between the 2 operators.

I have spent some time digging around the code, and it seems to me that
subtasks with the same id (0 for non parallel tasks), for different
operators, in the same slotSharingGroup are always sharing the same task
manager slot.

I have the following questions:
- Is this observation correct?
- Is this something I should build functionality on in the Iceberg
connector?
- Is there an alternative way to enforce colocation of subtasks?
- Is there an alternative way for a downstream operator to talk to an
upstream operator using standard Flink features without adding some
external dependency to the job?

For the record here is the discussion on github [1], and on the google doc
[2].

Thanks,
Peter

[1] https://github.com/apache/iceberg/pull/10484#discussion_r1652149085
[2]
https://docs.google.com/document/d/16g3vR18mVBy8jbFaLjf2JwAANuYOmIwr15yDDxovdnA/edit#heading=h.lt9eaimi6zyz

Reply via email to