QuakeWang opened a new pull request, #8183:
URL: https://github.com/apache/paimon/pull/8183
### Purpose
The source split readers keep a single pooled iterator and may also hold
`currentFirstBatch` after seeking past restored records.
The old design had two reliability gaps:
- `close()` only closed the lazy record reader, so an already fetched
`currentFirstBatch` could be left unreleased.
- `releaseBatch()` returned the pooled iterator only after the underlying
batch release succeeded. If `iterator.releaseBatch()` threw, the single-entry
pool lost its iterator and later fetches could block forever.
This PR releases `currentFirstBatch` during close, always returns the pooled
iterator in a `finally` block, and aligns the CDC reader's no-split fetch path
with the common reader by failing clearly instead of returning without a valid
split.
### Tests
- `mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build
-DfailIfNoTests=false -Dtest=FileStoreSourceSplitReaderTest test`
- `mvn -pl paimon-flink/paimon-flink-cdc -am -Pfast-build
-DfailIfNoTests=false -Dtest=CDCSourceSplitReaderTest test`
--
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]