Skip to content

fix(inkless:consolidation): start consolidation when remote storage is enabled on a diskless topic#652

Draft
viktorsomogyi wants to merge 1 commit into
svv/ts-unification-seal-fixfrom
svv/ts-unification-consolidation-start-fix
Draft

fix(inkless:consolidation): start consolidation when remote storage is enabled on a diskless topic#652
viktorsomogyi wants to merge 1 commit into
svv/ts-unification-seal-fixfrom
svv/ts-unification-consolidation-start-fix

Conversation

@viktorsomogyi

Copy link
Copy Markdown
Contributor

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.

@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-seal-fix branch from a766057 to e6c7bf6 Compare June 23, 2026 08:11
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-consolidation-start-fix branch from 415af0f to 8df6b97 Compare June 23, 2026 08:42
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-seal-fix branch from e6c7bf6 to 497bc4c Compare June 23, 2026 09:36
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-consolidation-start-fix branch from 8df6b97 to 4c62248 Compare June 23, 2026 09:45
@viktorsomogyi viktorsomogyi requested a review from Copilot June 23, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-consolidation-start-fix branch from 4c62248 to b8917ae Compare June 23, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants