You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2026/07/13 22:11:00 UTC

[jira] [Created] (FLINK-40140) Extract reader recovery gating from DynamicKafkaSourceEnumerator into a ReaderRecoveryCoordinator

Sylwester Lachiewicz created FLINK-40140:
--------------------------------------------

             Summary: Extract reader recovery gating from DynamicKafkaSourceEnumerator into a ReaderRecoveryCoordinator
                 Key: FLINK-40140
                 URL: https://issues.apache.org/jira/browse/FLINK-40140
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / Kafka
            Reporter: Sylwester Lachiewicz


DynamicKafkaSourceEnumerator (~1,200 lines) accumulated three interacting pieces of recovery gating state with FLINK-39980: initialReaderRegistrationPending, pendingReportedSplitsByReader, and pendingMetadataUpdateReaders. The gating semantics (when to defer split assignment and metadata update events during recovery) are implicit in field interactions spread across several methods, and cannot be tested without driving the whole enumerator.

 

Proposal: extract this state into a dedicated ReaderRecoveryCoordinator collaborator with intent-revealing methods (hasPendingRecovery, shouldDeferMetadataUpdateEvents, drainReportedSplits, drainDeferredMetadataUpdateReaders) covered by direct unit tests. No behavior change intended; orchestration stays in the enumerator.

 

This is preparatory cleanup toward further decomposition of the enumerator (e.g. bounded-mode no-more-splits termination signaling), whose coupling contributed to the idle-reader hang observed in SourceTestSuiteBase#testIdleReader.



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