[flink] Decouple Committer.Context from operator-only assumptions#8221
Open
ifndef-SleePy wants to merge 5 commits into
Open
[flink] Decouple Committer.Context from operator-only assumptions#8221ifndef-SleePy wants to merge 5 commits into
ifndef-SleePy wants to merge 5 commits into
Conversation
added 5 commits
May 29, 2026 20:41
Adds the StateStore interface and an OperatorStateStore-backed implementation; no existing code path is touched yet.
Replaces direct OperatorStateStore usage in Committer.Context and the commit listeners with the new StateStore, and adds a no-op default Committer.snapshotState().
Interface now takes Committer.Context and committables instead of Flink state contexts; implementations acquire state via Committer.Context.stateStore().
CommitterOperator now invokes committer.snapshotState() at the snapshot boundary, and the listener-state persistence is relocated from groupByCheckpoint to the dedicated snapshotState override (forwarded by StoreMultiCommitter).
…text Widens Committer.Context.metricGroup() to MetricGroup; CommitterMetrics adapts to either an OperatorMetricGroup (using its IO counters) or a plain MetricGroup (using local SimpleCounters).
ba19a05 to
546a2dd
Compare
Author
|
Please take a look @JingsongLi . BTW I couldn't reproduce the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Tracked under: #8220
Remove the assumption that
Committeralways runs inside a Flink operator, so the same committer logic can be hosted by either an operator or aOperatorCoordinator(introduced in a follow-up PR under #8220 ).This PR is a pure refactor — no behavior change.
Changes
StateStoreabstraction for committer state access, with operator-backed and memory-backed implementations.Committer.Contextstate access throughStateStore; decoupleCommittableStateManagerfrom Flink's state initialization context.StoreCommitter.snapshotState, so the committer owns its state lifecycle end-to-end.Committer.Contextso it is not tied toOperatorMetricGroup, and adaptCommitterMetricsaccordingly.Tests
Existing committer / sink unit tests pass unchanged.