Sorry, I created the ticket without a complete description. Please go to the ticket <https://issues.apache.org/jira/browse/FLINK-39645>for a full summary of the issue.
The problem is we encountered a very rare case under an unstable deployment environment and Flink's hybrid source permanently lost tracking of some splits because the `snapshotState` method wasn't robust enough. On Sun, May 10, 2026 at 3:13 PM Chen Zhang (Jira) <[email protected]> wrote: > Chen Zhang created FLINK-39645: > ---------------------------------- > > Summary: HybridSourceReader.snapshotState() loses recovered > splits when currentReader is null > Key: FLINK-39645 > URL: https://issues.apache.org/jira/browse/FLINK-39645 > Project: Flink > Issue Type: Bug > Components: Connectors / HybridSource > Reporter: Chen Zhang > > > @Override > public List<HybridSourceSplit> snapshotState(long checkpointId) { > if (currentReader != null) { > List<? extends SourceSplit> state = > currentReader.snapshotState(checkpointId); > return HybridSourceSplit.wrapSplits(state, currentSourceIndex, > switchedSources); > } else { > return new ArrayList<>(restoredSplits); > } > } > {code} > > Additionally, a unit test should be added that verifies snapshotState() > preserves restoredSplits when no reader has been activated yet. > > > > -- > This message was sent by Atlassian Jira > (v8.20.10#820010) >
