taowenjun opened a new pull request, #13492:
URL: https://github.com/apache/seatunnel/pull/13492

   ### Purpose of this pull request
   
   Yes, I am contributing this fix to Apache SeaTunnel. Closes #13491.
   
   Spark parallel source tasks independently enumerate the same Paimon snapshot 
and assign readers by hashing `splitId()`. `PaimonSourceSplit` already stores a 
generated ID, but its accessor returns `split.toString()`. Paimon `DataSplit` 
inherits `Object.toString()`, whose hash can depend on nested enum identity 
hashes and therefore differ across executor JVMs. Tasks can disagree about who 
owns the same file, causing both missing and duplicate assignments without task 
failures.
   
   Return the existing generated `id`. The generator, assignment algorithm, 
dependency versions, configuration defaults and serialized split fields are 
unchanged. Add two focused ID/serialization regressions, assert generated IDs 
on real splits in the existing Paimon E2E, and document ownership/upgrade 
implications in English and Chinese.
   
   ### Released-version reproduction
   
   An isolated Spark metadata diagnostic using official **3.1.0** Paimon 
connector + matching Spark 3 starter, JDK11, Spark3.4.3 and bundled Paimon1.1.1 
reproduced the problem. Paimon classes/SPI were isolated from an older 
Spark-bundled JAR using one shared loader per executor; loaded-code hashes were 
verified. Each of 16 tasks instantiated the real source/enumerator, registered 
only its own reader, and independently planned the same 91-file fixed snapshot.
   
   | Assignment metric | Official 3.1.0 | Only this class fixed |
   |---|---:|---:|
   | Missing files | 31 | 0 |
   | Duplicated files | 22 | 0 |
   | Extra copies | 28 | 0 |
   | Assignment records | 88 | 91 |
   | Expected assigned rows | 63,272,298 | 65,382,462 |
   
   The verification JAR differed from the release JAR in **only 
`PaimonSourceSplit.class`**, checked entry by entry. No data reader or sink was 
instantiated: row counts above are split metadata expectations, not 
exported-data validation. Details and official artifact hashes are in #13491.
   
   ### Validation
   
   - New two-test ID regression fails on unmodified dev `39c74ce48` and passes 
with the fix.
   - `PaimonSourceSplitTest` + existing 
`PaimonStreamSourceSplitEnumeratorTest`: **6 tests passed**, no failures; 
scoped reactor `verify` passed on JDK17.
   - Paimon module and Paimon E2E changed-file Spotless checks passed.
   - Paimon E2E reactor `package` passed with `-DskipTests -DskipIT=true 
-Dskip.ui=true`; this compiles the added integration assertion. 
Docker/Testcontainers E2E execution was not run locally and remains for CI.
   - Official3.1.0 before/after metadata assignment diagnostic passed on JDK11 
as described above. No production deployment.
   
   ### Compatibility and limits
   
   Split identifiers and hashed reader ownership change. Do not mix old/new 
connector artifacts within one job. Finish bounded jobs before upgrading; 
qualify checkpoint/savepoint recovery and rescaling separately for stateful 
jobs. The existing assumption that independently enumerated plans have a 
consistent split order remains; this focused fix does not solve arbitrary order 
changes or change generator restore semantics.
   


-- 
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