DanielLeens commented on PR #13537:
URL: https://github.com/apache/seatunnel/pull/13537#issuecomment-7248382319

   # Implementation Notes and Trade-offs
   
   Current head `c7ffe67211f56faeee9177b6c694816e985aa011`; ordinary15-file 
correction from `8a4874e05ba0d7c86fa064b82b72116c10cd27b4`, pushed as 
DanielLeens. No POM/shared executable changes. External shared savepoint 
gateOPEN; not human-ready.
   
   ## Product corrections
   
   Transport configuration is now a parsing-free mapper prototype with 
INTERN_FIELD_NAMES off and CANONICALIZE_FIELD_NAMES on. Each decode copies it 
exactly once, and both the preflight and tree pass use that response's copy. 
Native byte[] encoding/BOM handling, duplicate/trailing rejection, constraints, 
exact number flags and arbitrary returned fields are unchanged. Root symbol 
lifetime is now one response rather than the full reader. No global 
Jackson/HTTP setting, name filter, new key-length limit or dependency was added.
   
   Reader publication accepts at most one row per poll. Complete request, 
shape, count, identity, window and row preparation stay on the owned worker; 
collection still precedes the emitted index under collector then state locks, 
including the atomic final-row transition. No new fields/UID/version or 
temporary-state compatibility branch was introduced. Full-page content and 
sorted-ID hashes now use collection counts, String lengths and explicit 
big-endian UTF-16 code units; no charset encoder can replace lone units before 
hashing. Both stored fields remain 32-byte SHA-256 values. Settings' 
admission-ASCII query signature is unchanged. Full-page verification, current 
history policy, terminal behavior and token rotation are preserved.
   
   All other product changes are mandatory multiline type/field/core-method 
comments and equivalent helper ordering in their existing owners. The full 
executable-token proof normalizes only the Reader constant/import/hash calls 
and Transport constructor flags/response copy, removes only the named moved 
declarations and new hash helpers, and then requires exact remaining token 
order. All old production bodies outside those explicit functional locations 
are identical. All Split tokens and both existing checkpoint UT bodies are 
identical.
   
   ## Installed regression and preservation boundaries
   
   All nine existing IT methods, all 78 original assertion/business-check calls 
and all original normal row/request/auth/TLS/retry/cancel/window/restore checks 
remain. No test class or POM was added.
   
   The original normal 100-row mid-page case still runs its changed-page 
rejection and exact stable 100-row restoration. Its initial rate is now 1 
row/second, its existing ORDERS configuration explicitly uses CP interval 1s / 
timeout 5s, and it requires two later completed checkpoints while SQL output 
remains partial and below 20 rows. The fast restore remains 100000 rows/second. 
This is the old 16-row poll's failure-capable checkpoint oracle, not a 
collector mock or a claim that non-XA SQL visibility is transactional 
checkpoint commitment.
   
   A second control in that same method saves a page with an unaccepted opaque 
tail containing ASCII JSON escape D800. Refetch changes only the escape to D801 
and must fail with the source's changed-page diagnostic before any tail output; 
the SQL prefix must remain exact. No positive illegal-UTF-16 PostgreSQL write 
is attempted. The original all-normal positive control remains independent. 
Source tracing proves the old replacement encoder would miss this content 
change; no local execution is claimed.
   
   The existing complete-resource method adds a modest nested custom-attribute 
map with a 32 KiB key, exact Unicode/decimal output and a UTF-16LE BOM. Its 
additional 256 KiB test response cap accommodates this representation without 
changing old cases' limits or production bounds. This is compatibility input, 
not a heap-retention proof. The existing failure method adds otherwise-valid 
JSON with one illegal UTF-8 byte and unchanged empty SQL output. No cache 
getter, reflection, GC or OOM probe exists.
   
   The terminal case retains FakeSource's 240 rows, 24 splits, rates, schema, 
Console sibling and all original successful assertions. Only its existing 
split-read interval is parameterized: initial 600000 ms holds later splits 
before the native collector monitor, restored 1 ms releases the test boundary. 
This makes the intended unfinished sibling explicit and DOES NOT repair the 
shared completed-coordinator savepoint rejection.
   
   All 13 original Python functions remain. Ten bodies are AST-identical; 
Control.route, Commerce.route and Commerce.write_page retain exact original 
normal paths after removing only the new mode branches/optional surrogate tail 
and substituting the equivalent original encoding expression. Original 
catalog/window/recovery HOCON files are byte-identical; the other two configs 
differ only by their explicit accepted CP timeout / companion interval lines. 
The source guides retain content/examples with standalone ASF openers and 
precise new ownership/handoff/hash wording. Original mapping, install, 
changelog and POM entries are untouched.
   
   ## Cleanup ownership and native provenance
   
   `native/cleanup-provenance.json` pins the exact current engine 
REST/lifecycle sources and OpenJDK FutureTask source. JobInfoService returns 
jobId-only JSON during initial invisibility and matching jobId on stop 
acknowledgement. The cleanup polls status and issues 
force=true/isStopWithSavePoint=false through test-private HttpURLConnection 
with connect/read timeouts, a captured two-second disconnect watchdog and a 
finite response envelope. It recognizes all four concrete final statuses; 
null/UNKNOWABLE is confirmed twice only after an owned invocation has exited. 
Every nonterminal native status takes the cancellation path. No unbounded 
native CLI/status helper is wrapped in a Future to pretend cleanup is bounded.
   
   Raw FutureTask submissions are registered before scheduling. A distinct 
run-exit latch separates actual invocation unwind from Future cancellation; 
cancellation before run is safe because native FutureTask prevents invoking its 
callable. Cleanup visits every requested job, finitely gets each Future and 
waits for run exit even when stop/status fails. Cancellation is only unfinished 
fallback. TWR attaches cleanup failures to the original assertion/cause. 
Fixture selection rejects any still-running prior invocation before clearing 
calls or SQL. Class cleanup always tears down the engine, joins its owned 
submission executor and deadline scheduler, and closes PostgreSQL/fixture, 
preserving later errors as suppressed. Existing main-business CLI 
savepoint/cancel assertions remain; the bounded replacements are for cleanup 
and checkpoint-counter observations. Native teardown remains the existing 
test-container framework boundary.
   
   The bounded completed-counter helper reads the exact native 
`pipelines[0].counts.completed` contract. Its checked exception propagates 
through the existing helper/callers; no unverified signature is hidden by the 
AST result.
   
   ## Static verification and remaining gates
   
   `candidate-static.json` records all 15 hashes, full original-scope 
preservation, exact token normalizations, 124 old method/constructor 
comparisons, 19 multiline type contracts, external-before-private ordering, all 
old IT checks and Python normal-path proof. All 10 Java files and the Python 
fixture parse statically. All 35 materialized tracked POMs are XML-parseable 
and byte-identical. The 12 untouched original PR files are byte-identical. Diff 
whitespace passes, the index is empty and no untracked source exists.
   
   Native offline leaf Spotless apply/check passes for the actual nonempty 
9-file product/UT selection and 1-file IT selection, using the repository 
configuration; final logs and index lists are in the manifest. No model 
workaround, standalone POM, compilation, UT/IT/E2E, package/RAT, Docker, 
service/database/engine/provider, timing, heap/GC/OOM or runtime execution was 
performed. Both the incremental and original-base cumulative diffs are saved. 
Old-head Code style failure and skipped connector lanes cannot validate this 
candidate. Exact-head CI and the external shared-engine gate remain required on 
this corrected head.
   
   Incremental patch SHA-256: 
`66c4cb7b522437c4f9de6d69b3463d5b4d4a48c8d02552e57a113ddd79dca098`.
   
   Static receipt SHA-256: 
`f882feaae5f731f1bc758c4d0f3ca1d4a07d53b4bf5bef4e11c18895ef06c096`.
   
   Thank you for contributing to Apache SeaTunnel.
   


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