thswlsqls opened a new pull request, #17080:
URL: https://github.com/apache/iceberg/pull/17080

   Closes #17077
   
   ## Summary
   
   - `CommitState.addReady()` buffers every `DATA_COMPLETE` event in 
`readyBuffer` regardless of `commitId`, and `validThroughTs()` used that buffer 
unfiltered, so a zombie coordinator's stale event from a previous commit could 
corrupt or null out `VALID_THROUGH_TS_SNAPSHOT_PROP`.
   - `validThroughTs()` now filters `readyBuffer` by 
`Objects.equals(currentCommitId, payload.commitId())`, the same pattern 
`addReady()` already applies to `receivedPartitionCount`.
   - PR #16453 (merged) applied this filter to `receivedPartitionCount` and 
`isCommitReady()` but left `validThroughTs()` unfiltered — this closes that gap.
   
   ## Testing done
   
   - Added 
`TestCommitState#testGetValidThroughTsIgnoresZombieCoordinatorPayloads`, 
mirroring `testIsCommitReadyIgnoresZombieCoordinatorPayloads` from PR #16453, 
covering a zombie coordinator's `DATA_COMPLETE` (different `commitId`, null 
timestamp) being excluded from the valid-through calculation.
   - Updated `TestCommitState#testGetValidThroughTs` to stub `commitId()` on 
its mocked `DataComplete` payloads so they match the new filter.
   - `./gradlew :iceberg-kafka-connect:iceberg-kafka-connect:check` passes — 
`TestCommitState` 5/5, full module 123/123, 0 failures.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to