DanielLeens commented on PR #13533: URL: https://github.com/apache/seatunnel/pull/13533#issuecomment-7247158116
### Implementation Notes and Trade-offs Current head d4135df9d12b702cb04df56997271a13838fce7f. Contributes to Apache SeaTunnel. This connector-only correction follows the [full review](https://github.com/apache/seatunnel/pull/13533#pullrequestreview-6096785358). ### All five original connector findings — source-closed in this candidate 1. P0 incoming field-name retention: ActiveCampaignHttp's immutable constraint/feature mapper template disables INTERN_FIELD_NAMES. decode makes one response-owned mapper.copy for both token preflight and tree conversion. JsonFactory.copy creates fresh byte/character canonicalizer roots; CANONICALIZE_FIELD_NAMES remains enabled to preserve the native byte bootstrapper, BOM and malformed-UTF8 contract. Strict duplicates/trailing documents, depth100/number1000/token250000, BigInteger/BigDecimal precision/trailing zeros and bounded byte/deadline checks remain. No original transport/retry/socket/TLS/error method body changes. Per-response input bounds now own the response name roots; no global Jackson/engine mutation or cross-page root retention is added. 2. High whole-page lossy hash: digestStrings writes each Java String's int32 big-endian code-unit length, then each char's high/low byte directly to SHA256. Both ordered full-record digests and sorted ID-set fingerprints use it. Distinct admitted escaped unpaired UTF16 units no longer collapse through JDK UTF8 replacement. The complete page including unaccepted suffix is still verified before skipping a restored prefix; no accepted-prefix-only fallback is introduced. The ASCII scan identity keeps its existing digest and all Settings constructors/verification unchanged. State shape/fields/version and public schema/options remain; this is a new unreleased connector, not a claim of cross-release compatibility for earlier intermediate PR state. 3. High decoded-output checkpoint handoff: ROWS_PER_POLL16 becomes1; all emit/poll/commit/snapshot/page-completion/cancel executable method bodies remain unchanged. A prepared page stays off-lock until publication, is reused across polls and advances emitted only after successful collect under the same checkpoint/state locks. One downstream collect can still wait. This removes batch amplification under supported env row throttling without shared engine changes, new workers/state, arbitrary timeout inflation or an unconditional deadline guarantee. 4. Medium lifecycle/type contracts and organization: all eight Java files now explain response/parser/transport ownership, finite deadlines, state/digest/prefix/terminal/early fallback and test acceptance. Constructors/external entries precede private helpers. Root's AST/token comparison preserves100 original method/constructor bodies; only the HTTP constructor, decode ownership and prepare digest construction intentionally differ, plus the declared quantum. All original two component/nine IT methods/helpers/assertions remain; no extra formal test is added for comments/moves. 5. Low bilingual limits: both guides state one-row handoff, exact code-unit whole-page verification, input JSON/header/token/numeric limits, finite recent128page fingerprints,10empty continuations, account/token admission and platform DNS/late-result boundary. They distinguish per-response bounds from whole-worker heap guarantees and offset scans from snapshots/exactly-once. The dedicated HTTP/reader/options helpers are the smallest complete and best boundary for these fixes. A shared parser/engine rewrite affects unrelated consumers and is outside authorized scope; a byte-only guard misses retained roots, a lossy charset hash misses accepted Strings, and a longer timeout hides the emission defect. Added response-local parser allocation and char-level hashing/poll handoffs have maintenance/CPU cost; no benchmark or heap acceptance is inferred. ### Regression failure capability and preserved original coverage The existing ActiveCampaignSourceIT gains two actual-engine methods and two copied configs, giving11 authored IT methods alongside the unchanged two component methods. All nine old IT bodies/assertions—including the externally blocked terminal-savepoint scenario—remain. All eleven other original PR files, registrations, both original configs and POMs are unchanged. The Python old fixture AST is preserved after removing only the new modes/hash-change control. checkpointsBetweenDecodedRowsAndRestoresNativeEncodedPages uses real installed Zeta, independent HTTPS and unkeyed PostgreSQL for40exact campaigns/two20record pages. Distinct4096char keys and Unicode values arrive through UTF16BE+BOM thenUTF8+BOM. With env1row/s/CP1s/timeout5s/retry0, two later completed checkpoints must occur while page1 remains partial and only one provider GET exists. Completed stop-savepoint and original invocation exit precede the exact stable prefix; native restore must produce exact40full JSON records once and only the requests justified by that prefix. A separate malformed-UTF8 negative in that same test must fail before rows/continuation. The old16row quantum cannot satisfy this short handoff window; a UTF8-only or Reader-fallback parser loses independent encoding controls. This is source-derived failure analysis, not a locally executed result or direct runtime proof of cache lifetime. rejectsChangedWholePageAfterNativePartialSavepoint uses100records/4rps with the ordinary30s timeout so the old16row quantum can reach a genuine partial checkpoint. After visible Console prefix, a newer native completed checkpoint and successful stop-savepoint, the fixture changes an accepted first record's escaped U+D800 to U+D801. Restore must fail specifically on changed whole-page verification before any tail Console row, with exact two page0 requests. It uses valid escaped JSON and Console IDs rather than relying on JDBC malformed-Unicode storage. It does not claim live provider surrogate support, SQL data loss, transactional Console receipts or cryptographic collisions. Root independently read all13 actual changed files/new configs, whole HTTP/reader/digest flow, old/new fixture/test assertions and guides, then verified all source hashes and100 preserved bodies. Root added finite45s active-invocation joins through finally in only the two new tests so cancellation failure cannot silently leave the old invocation writing into a later scenario. Product/E2E scoped Spotless passed; the new-test-only cleanup formatting/check passed again in3.061s. No old helper/assertion/input/timeout/coverage was weakened. ### Retained normal-path, compatibility and packaging audit The public Factory/Source route executes these fixes. One reader scans the immutable resource order, retains early fallback, returns detached split arrays/history, and keeps credentials out of checkpoints. Whole-page preparation/validation precedes publication; exact accepted rows and logical positions advance together. Recent ID fingerprints detect bounded repeats; offset changes between pages are not a remote snapshot. Terminal split behavior and the original terminal recovery assertion remain unchanged. The configured account HTTPS origin, strict hostname verification, fixed Api-Token header, no redirects, raw TCP abort ownership through TLS/finally, bounded gzip/HTTP/JSON input, attempts/pacing/Retry-After/deadlines and late-result rejection remain. No shared logger/TLS/proxy/parser/provider setting changes. Native option masking handles token; normal diagnostics retain fixed connector-owned reasons without raw peer causes. Explicit JSSE plaintext debugging/downstream record logging remain separate. The cumulative feature adds its submitted installer/mapping/Factory/HTTP parent/dist/E2E parent and dedicated POM envelope. This correction changes no POM, dependency/version, shared runtime/API/CDC/worker/checkpoint code or unrelated connector. Source produced CatalogTable/options match native specification declarations. Generated SPI/resources/dependency packaging, RAT, distribution specification and installed execution still require current-head CI. Official legacy segment GET mapping is retained; a current linked-v3-doc404 is not recast as nonexistent endpoint. Tenant permissions, later-page provider shape and live-account acceptance remain unexecuted. ### Exact-head CI update: shared-engine mixed-terminal savepoint gate (blocks handoff) Actual Build46105102010/job140915004227 ran all nine original ActiveCampaign IT methods: eight passed and keepsCompletedCollectionTerminalWhenAnotherPipelineSaves failed because its stop-with-savepoint CLI returned1. This does not validate the unpushed candidate or its two new tests. The logs and native source show pipeline1 persisted a completed-point and reached FINISHED while pipeline2 continued. JobMaster.savePoint calls CheckpointManager.triggerSavePointsAndWaitComplete263–266, which visits every retained coordinator. Pipeline1 startSavepoint938–940 rejects shutdown OR completed, while pipeline2 writes its savepoint. The aggregate wait still propagates pipeline1's rejection and the CLI fails. This is not provider failure, row throttling or a checkpoint timeout; more waiting cannot repair a completed coordinator's refusal. The rejection originates in shared engine #6568 and the aggregate wait/fanout in #11489. Public lifecycle documentation describes job savepoint generally, but an explicit finished-sibling guarantee was not established. Existing multi-pipeline tests keep both pipelines active, and a finished-plan restore test does not prove creating this mixed-terminal savepoint. Native CheckpointRestoreUtils accepts COMPLETED_POINT in CHECKPOINT restore, while SAVEPOINT restore requires SAVEPOINT_TYPE; simply swallowing the stop rejection would not establish a complete restore set. This is an evidenced shared-engine capability/CI incompatibility exposed by the connector's retained scenario. The best complete solution must audit stop aggregation and restore selection/terminal pipeline handling together. The user explicitly limits this task to connector-private code, so no engine/API/worker/shared checkpoint change is made. All nine original tests/assertions, including successful stop-savepoint and exact restore route/output, remain. No skipping, longer wait, poll-forever, cancel/checkpoint substitution or ignored CLI failure is accepted as equivalent coverage. Connector-owned parser/hash/quantum fixes can be independently reviewed/pushed, but this additional gate remains until closed elsewhere and the relevant exact-head CI passes. No human-ready notification is warranted. ### Actual validation and independent gates Exact GitHub headd4135df9d12b702cb04df56997271a13838fce7f, mergeable=True; ordinary canonical dev merge-tree against0bef81d003a9dcc3266a10140dc639534ad81bfd succeeds. Final13 staged/committed file hashes match root's final reviewed manifest; two new configs are100644. Java/AST/token/constructor preservation, unchanged old POMs/configs/registration, Python AST, JSON fixture bytes, UTF8/source/diff checks and scoped Spotless pass. No local compilation, component/IT/E2E, package/RAT, Docker/service/engine/provider, HTTP/network fixture, timing/heap/OOM test or live account ran. Authored2component/11IT counts are not passing new-head executions. Old exact-head CI8pass/1failure is historical; the new Build must execute all original/new cases, relevant compilation/packaging/specification and pass. The old shared-engine diagnosis remains an unclosed external gate unless current exact-head evidence closes it. Never delete/skip/weaken that test, modify shared engine under this task, transfer old CI green, or notify human readiness from a queued build. Fresh head/discussion/no-conflict plus actual relevant green CI and closure of every source/external blocker precede the requested notice. Maintainer approval/merge remain separate. -- 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]
