cshuo commented on issue #20808: URL: https://github.com/apache/hudi/issues/20808#issuecomment-7094170950
Thanks for the careful analysis, @smiralexan. Your explanation makes sense, and I was able to reproduce the failure with Flink 1.20.1 and Hudi 1.2.1 by resubmitting the same JAR to the same JobManager. The static counter in `Pipelines.opUID()` is shared across jobs that reuse the same Hudi classloader, so operator IDs depend on which jobs were built earlier. We considered two alternatives, but neither works as a general fix. 1. **Scope the counter to a single job.** We found no reliable scope across SQL and `HoodiePipeline`. One execution environment can build multiple jobs, and separately translated SQL plans can end up in the same job. 2. **Use Flink’s JobID as the cache key.** In Flink 1.20, Hudi assigns operator UIDs while building `Transformation` objects. Flink generates the default JobID later, when it converts the `StreamGraph` into a `JobGraph`. I’d suggest keeping the counter by default for backward compatibility and adding an optional `uid-suffix` per source or sink. This would let users override the counter to match the original operator UIDs and recover state from older savepoints when a UID mismatch would otherwise prevent restoration. -- 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]
