Mithilbatra commented on issue #13351: URL: https://github.com/apache/seatunnel/issues/13351#issuecomment-7012396609
Hi @zhangshenghang, thanks for the clear write-up. I'd like to work on this one. Plan, starting with the minimum fix (option 1): - Make `PhysicalPlan.preApplyResourceFutures` a `ConcurrentHashMap` (and `volatile`). `setPreApplyResourceFutures` copies into a new `ConcurrentHashMap`, so the full-job path can't swap a plain `HashMap` back in. - Document the concurrency contract on the getter: the map is shared across pipelines and must not hold `null` values. Today only fully successful pre-applies reach it, so that holds already. - No check-then-act on the shared map: `JobMaster` only `putAll`s a pipeline's own entries and `ResourceUtils` only `get`s, so per-key atomicity is enough. - Add a unit test where several pipelines merge their futures into the same `PhysicalPlan` at once, and check that no entry is lost. The per-`PipelineLocation` immutable snapshot (option 2) seems like a bigger refactor, so I'd leave it for a follow-up unless you'd like it in the same PR. Could you assign this to me? -- 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]
