Martijn Visser created FLINK-40779:
--------------------------------------

             Summary: JdbcSourceEnumerator snapshots splitter state ahead of 
the splits it has handled
                 Key: FLINK-40779
                 URL: https://issues.apache.org/jira/browse/FLINK-40779
             Project: Flink
          Issue Type: Bug
          Components: Connectors / JDBC
    Affects Versions: jdbc-4.1.0
            Reporter: Martijn Visser


{{JdbcSourceEnumerator}} runs {{SplitterEnumerator#enumerateSplits}} through 
{{callAsync}}, so the splitter advances its state on the worker thread while 
the splits only reach {{unassigned}} once the handler runs on the coordinator 
thread. A checkpoint taken in between stores the new splitter state without 
those splits, and they are lost on restore. {{SqlTemplateSplitEnumerator}} in 
continuous mode is affected today.

{{snapshotState}} should use the splitter state that came back together with 
the last handled splits, captured inside the callable, instead of calling 
{{serializableState()}} directly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to