programmerloverun commented on PR #10849:
URL: https://github.com/apache/seatunnel/pull/10849#issuecomment-4758441655

   @davidzollo Thanks for the detailed post-merge guidance. I've opened a 
focused follow-up PR for the source-side synchronization, implemented exactly 
as you outlined: #11144
   
   - Plain `private final Object stateLock` — no `ReentrantLock`, no 
line-by-line synchronization.
   - `BigtableSourceReader`: lock only the `pollNext` state-transition block 
(poll `pendingSplits` + assign `currentSplit`, and clear `currentSplit` after 
the read completes), plus `snapshotState` and `addSplits`. The `readRows` 
network scan stays outside the lock, and `output.collect` keeps using the 
checkpoint lock only. `handleNoMoreSplits()` stays on the existing `volatile` 
flag.
   - `BigtableSourceSplitEnumerator`: lock `addSplitsBack`, `registerReader`, 
and `snapshotState`, guarding `assignedSplits` / `pendingSplits` / 
`initialized`, with `initializePendingSplits()` and `assignSplit()` running 
only under the lock.
   - `BigtableSourceState`: defensive copy of the assigned split set instead of 
the live reference.
   - No sink-side changes, as suggested.
   
   Verified locally on JDK 11: `spotless:check` passes and all 13 unit tests 
pass. PTAL when you have a chance.


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