fix(inkless:consolidation): start consolidation when remote storage is enabled on a diskless topic#652
Draft
viktorsomogyi wants to merge 1 commit into
Conversation
a766057 to
e6c7bf6
Compare
415af0f to
8df6b97
Compare
e6c7bf6 to
497bc4c
Compare
8df6b97 to
4c62248
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures consolidation starts when remote.storage.enable=true is applied to a diskless topic via a config-only controller delta (i.e., without any leader/partition-change delta that would otherwise trigger the existing consolidation start path). This fits into the inkless consolidation flow by covering the “classic → consolidated” and “untiered-diskless → consolidated” upgrade sequences where remote storage enablement can arrive after the seal commit.
Changes:
- Add a TopicConfigHandler hook to start consolidation fetchers when remote log storage flips from disabled → enabled on a diskless topic.
- Start consolidation for the topic’s currently-online partitions (leaders + followers), deferring per-partition readiness to the reconciler.
- Add unit tests covering: non-diskless topics (no consolidation), diskless topics on first enable (starts consolidation), and diskless topics already enabled (no redundant start).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/src/main/scala/kafka/server/ConfigHandler.scala | Starts consolidation from the topic-config change path when remote storage is enabled for a diskless topic. |
| core/src/test/scala/unit/kafka/server/DynamicConfigChangeTest.scala | Adds unit tests validating consolidation start behavior for diskless vs non-diskless topics and guarding against redundant restarts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s enabled on a diskless topic The controller applies a classic-to-consolidated switch as separate metadata deltas: remote.storage.enable=true arrives as a config-only delta with no leader or partition change, so the leader-delta path never starts the consolidation fetcher. TopicConfigHandler now kicks off consolidation for the topic's online partitions when remote storage flips from false to true on a diskless topic; the reconciler skips any partitions that are not ready yet and it is a no-op for non-consolidating topics. Note: this hook resolves partitions from logManager.logsByTopic(topic), so it only fires for a topic that still has a local log when remote storage flips on -- i.e. a topic switched from classic, whose classic prefix is still local. A born-diskless topic left untiered before consolidation was enabled has no local log, so this path does not cover that untiered-diskless -> consolidated upgrade. Co-authored-by: Cursor <cursoragent@cursor.com>
4c62248 to
b8917ae
Compare
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.
The controller applies a classic-to-consolidated switch (and the untiered-diskless -> consolidated upgrade) as separate metadata deltas: remote.storage.enable=true arrives as a config-only delta with no leader or partition change, so the leader-delta path never starts the consolidation fetcher. TopicConfigHandler now kicks off consolidation for the topic's online partitions when remote storage flips from false to true on a diskless topic; the reconciler skips any partitions that are not ready yet and it is a no-op for non-consolidating topics.