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

   ### Implementation Notes and Trade-offs
   
   Head: `25f27d48d9ae5afeeb4b546dced42f9e5d74de55`. This correction addresses 
the two P0 paths, maintenance finding and fragment-policy observation in the 
[complete original-head 
review](https://github.com/apache/seatunnel/pull/13530#pullrequestreview-6096154561).
   
   Each accepted client now has an independently owned raw TCP socket before 
TLS layering/handshake. Deadline and cancel close that raw socket without JSSE 
close-notify/write locks. The worker remains registered during ordinary TLS 
close, preserving an external abort path until final cleanup. Configured 
JKS/PKCS12, server-mode TLS 1.2/1.3 and no required/requested client 
certificate remain. A close pool would only move blocked threads; raw ownership 
fixes this dedicated boundary without a new server framework/dependency.
   
   Typed JSON/TEXT now have `max_decoded_units` (default 1,048,576, range 
1..4,194,304), separate from wire/frame/queue bytes. Prospective row slots 
including null padding, entries, visited characters/paths and scalar work are 
admitted before proportional typed allocations. The same finite limit 
separately bounds schema inspection and retained formatter paths. Units are 
lower-bound work/admission accounting, not heap bytes or elapsed time. Large 
sparse/repeated values may fail below the wire cap; raw/schema-free text retain 
their wire-only path.
   
   JSON schema/DECIMAL inspection and composite conversion are lazy/iterative, 
using native public scalar converters only. Missing/null rows, typed arrays and 
normalized numeric-key overwrite behavior are preserved. TEXT range preflight 
precedes the unchanged native decoder and matches 
delimiter/level/trailing-empty/null-padding behavior, including field-path work 
for missing columns. It keeps the existing seven-separator boundary without an 
arbitrary new depth cap. A wire-only/post-conversion check would miss 
expansion; a shared serializer rewrite would widen compatibility scope. This 
local adapter adds traversal/maintenance cost and should track future native 
type changes.
   
   Incoming JSON uses a never-parsed template and a per-message mapper/factory 
copy with fresh symbol roots; interning is disabled while canonicalization 
stays enabled to preserve byte-parser selection. Independent strict UTF8 checks 
cover text and binary JSON. The narrow old acceptance of UTF8 BOM and 
ASCII-only zero-interleaved UTF16/32 without BOM is preserved; broader 
non-UTF8/BOM support is not claimed. Native scalar rendering was audited 
separately: pinned JsonNode.toString is nonrecursive, vectors are 
element-admitted before arrays, and compact decimal handling does not expand 
extreme scales to plain digits. Existing read-depth/numeric limits remain; this 
is not a claim that all native/JDK recursion or total worker heap risk is 
eliminated.
   
   All 22 legacy client/product/E2E files, six original IT 
bodies/assertions/helpers, original queue UT and three job configs are 
unchanged. Five additional component methods and two IT methods are authored 
(six component/eight IT methods total). JSON's new distinct TrackingObjectNode 
values count a runtime get(String) surface shared by native/new conversion: old 
full conversion would perform2,048 lookups; the new oracle requires positive 
progress below 128 before rejection. TrackingRow's separate JSON getter 
observes only the bounded helper, while TEXT's getter is used by native padding 
too. Valid native scalar/nested/deep/nullable/encoding cases remain covered. No 
intentional OOM fixture is used.
   
   The new WSS peer sends valid freshly masked Pings without reading Pongs and 
separately owns raw cleanup before waiting on TLS futures. It checks another 
deadline, finite cancellation and rebind with an exact row. The new typed 
engine case persists small JSON/TEXT rows before requiring safe budget failure 
and no oversized output. These are authored assertions, not executed results. 
Both guides also disclose the retained1,024-data-fragment policy.
   
   The twelve-file correction is confined to this server Source, existing 
tests, two new budget configs and guides. Production POM/shared runtime/client 
Source/Sink/dependencies/Assignment state format remain unchanged. The 
cumulative feature retains its submitted dedicated E2E POM/parent registration. 
Checkpoints still contain assignment only: queued/fragmented data can be lost, 
placement can move, protocol success is not downstream acknowledgement, and 
senders own replay/deduplication.
   
   Complete cumulative/incremental source/discussion/call-chain review, static 
syntax/order/license/options/registration and preservation/hash/whitespace 
checks passed. Canonical-dev static merge/source comparison found no conflict; 
actual merged compilation was not run. Product/E2E leaf Spotless apply/check 
returned BUILD SUCCESS on the pushed contents. No local compile, UT/IT/E2E, 
package/SPI/specification, Docker/service/job, network fixture, OOM/hang or 
live operation was executed. Exact-head [Build 
46116986330](https://github.com/DanielLeens/seatunnel/actions/runs/46116986330) 
is queued without a conclusion. Source is eligible for human review with CI 
pending; runtime/production acceptance, approval and merge are separate gates.
   


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