zhangshenghang commented on PR #12163:
URL: https://github.com/apache/seatunnel/pull/12163#issuecomment-5570356909

   Thanks @DanielLeens for the thorough review — the Zeta call-chain trace was 
exactly right. All three issues are addressed in the new commits:
   
   **Issue 1 (High) — Zeta `sendEventToSourceReader` no-op:** Implemented for 
real in a73aadb565. `SeaTunnelSplitEnumeratorContext.sendEventToSourceReader` 
now sends a new `SourceEnumeratorEventOperation` (the enumerator→reader 
counterpart of `SourceReaderEventOperation`, registered as task-data type 29) 
to the target reader's task member. The operation deserializes the event with 
the target task's class loader and forwards it via 
`SourceSeaTunnelTask.receivedSourceEvent` → 
`SourceFlowLifeCycle.receivedSourceEvent` → `SourceReader#handleSourceEvent`. 
The send is fire-and-forget (no `.join()`) because the enumerator may be 
dispatching a reader event on a Hazelcast operation thread, where blocking on 
the send future could deadlock the operation system — a lost event degrades 
safely since readers re-send reports. This restores the intended ack-driven 
pruning on Zeta, so no unbounded `finishedUnackedSplits` growth or O(n²) resend 
traffic.
   
   **Issue 2 (Low) — import order:** Fixed; `spotless:apply` passes and the 
file now matches AOSP ordering.
   
   **Issue 3 (Medium) — tests:** Added two unit tests in 
`IncrementalSourceReaderTest`: `testAckRemovesFinishedSplitsFromUnackedState` 
(ack removes acked ids, state is empty afterwards) and 
`testFinishedSplitsAreResentUntilAcknowledged` (before any ack the report 
carries the full unacked set; after an ack only new splits are reported). One 
follow-up from your analysis: since acks now arrive on the engine's 
event-delivery thread while splits finish on the reader thread, 
`finishedUnackedSplits` was switched to `ConcurrentHashMap` in e01498602d.


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