[
https://issues.apache.org/jira/browse/FLINK-41010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127669#comment-18127669
]
tchivs commented on FLINK-41010:
--------------------------------
I would like to work on this. I cannot self-assign, so please assign it to me
(tchivs). The fix and a unit test are ready; I will open a PR against master
once assigned.
> [cdc-base] NPE in HybridSplitAssigner.createStreamSplit when failed snapshot
> splits are re-added after assigner finished
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-41010
> URL: https://issues.apache.org/jira/browse/FLINK-41010
> Project: Flink
> Issue Type: Bug
> Components: Flink CDC
> Affects Versions: cdc-3.6.0, cdc-3.7.0
> Reporter: tchivs
> Priority: Major
>
> FLINK-40052 reports this for MySQL. The incremental snapshot framework in
> flink-cdc-base (used by Postgres, Oracle, SQL Server, Db2) has the same
> defect, and the open PR for FLINK-40052 only changes the MySQL assigner.
> With parallelism 1, {{SnapshotSplitAssigner#onFinishedSplits}} moves the
> status to {{INITIAL_ASSIGNING_FINISHED}} as soon as the last split reports.
> If the reader then fails and the split comes back through {{addSplits}}, the
> status is not rolled back, {{noMoreSplits()}} returns true, and
> {{HybridSplitAssigner#createStreamSplit}} dereferences the missing finished
> offset ({{HybridSplitAssigner.java:316}} on master). The state is
> checkpointed, so restarting the job hits the same NPE.
> Suggested fix: in {{SnapshotSplitAssigner#addSplits}}, roll
> {{INITIAL_ASSIGNING_FINISHED}} back to {{INITIAL_ASSIGNING}} (and
> {{NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED}} back to
> {{NEWLY_ADDED_ASSIGNING}}) and clear {{checkpointIdToFinish}}, mirroring the
> MySQL fix.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)