Skip to content

feat(inkless:switch): auto-enable remote.storage.enable on diskless topic creation#619

Merged
jeqo merged 2 commits into
mainfrom
jeqo/kc-151-auto-enable-rs
May 29, 2026
Merged

feat(inkless:switch): auto-enable remote.storage.enable on diskless topic creation#619
jeqo merged 2 commits into
mainfrom
jeqo/kc-151-auto-enable-rs

Conversation

@jeqo
Copy link
Copy Markdown
Contributor

@jeqo jeqo commented May 28, 2026

When consolidation is enabled and a diskless topic is created, automatically persist remote.storage.enable=true in the topic config records. This ensures diskless topics always have remote storage in the consolidated model without requiring the operator to explicitly include it in the create request.

Also rejects creation with remote.storage.enable explicitly set to a non-true value, and excludes system topics from the auto-enable logic (they are never diskless).

Follows the same pattern as the existing diskless.enable auto-persist logic in validConfigRecords().

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 that when diskless topic remote-storage consolidation is enabled, newly created diskless topics automatically persist remote.storage.enable=true into the topic’s config records, so operators don’t need to explicitly include it in the create request.

Changes:

  • Thread a new controller flag (disklessRemoteStorageConsolidationEnabled) from broker config → QuorumControllerReplicationControlManager.
  • Add remote.storage.enable=true to CreateTopics response configs for diskless topics when consolidation is enabled.
  • Persist a ConfigRecord for remote.storage.enable=true on diskless topic creation when consolidation is enabled (if absent).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Adds response + metadata-log persistence of remote.storage.enable=true for diskless topics under consolidation.
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java Plumbs the consolidation-enabled flag into ReplicationControlManager.Builder.
core/src/main/scala/kafka/server/ControllerServer.scala Passes the broker config flag into the QuorumController builder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 3d37655 to 6f0ac71 Compare May 28, 2026 10:00
@jeqo jeqo requested a review from Copilot May 28, 2026 10:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 6f0ac71 to 3b200f4 Compare May 28, 2026 10:54
@jeqo jeqo requested a review from Copilot May 28, 2026 10:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 3b200f4 to dbf57cb Compare May 28, 2026 11:04
@jeqo jeqo requested a review from Copilot May 28, 2026 11:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from dbf57cb to 1a4e615 Compare May 28, 2026 11:11
@jeqo jeqo requested a review from Copilot May 28, 2026 11:12
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 1a4e615 to b9bb45e Compare May 28, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from b9bb45e to bdafb26 Compare May 28, 2026 11:25
@jeqo jeqo requested a review from Copilot May 28, 2026 11:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from bdafb26 to 1220968 Compare May 28, 2026 11:37
@jeqo jeqo requested a review from Copilot May 28, 2026 11:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 1220968 to 2fc2041 Compare May 28, 2026 12:17
@jeqo jeqo requested a review from Copilot May 28, 2026 12:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Base automatically changed from jeqo/kc-149-diskless-remote-storage-config to main May 28, 2026 13:20
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from 9313c53 to ae7279d Compare May 28, 2026 13:21
…opic creation

When consolidation is enabled and a diskless topic is created,
automatically persist remote.storage.enable=true in the topic config
records. This ensures diskless topics always have remote storage in the
consolidated model without requiring the operator to explicitly include
it in the create request.

Also rejects creation with remote.storage.enable explicitly set to a
non-true value, and excludes system topics from the auto-enable logic
(they are never diskless).

Follows the same pattern as the existing diskless.enable auto-persist
logic in validConfigRecords().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeqo jeqo force-pushed the jeqo/kc-151-auto-enable-rs branch from ae7279d to f985d56 Compare May 28, 2026 13:22
@jeqo jeqo marked this pull request as ready for review May 28, 2026 13:22
Comment thread metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java Outdated
Rename disklessEnabledForRemotePolicy → disklessEnabledOnCreation since
the variable is now used for both the remote policy and consolidation
auto-enable logic. Also assert diskless.enable=true ConfigRecord in the
defaultDisklessEnable test for completeness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeqo jeqo requested a review from giuseppelillo May 28, 2026 15:31
@jeqo jeqo merged commit be3c793 into main May 29, 2026
4 checks passed
@jeqo jeqo deleted the jeqo/kc-151-auto-enable-rs branch May 29, 2026 06:54
giuseppelillo pushed a commit that referenced this pull request May 29, 2026
…opic creation (#619)

When consolidation is enabled and a diskless topic is created,
automatically persist remote.storage.enable=true in the topic config
records. This ensures diskless topics always have remote storage in the
consolidated model without requiring the operator to explicitly include
it in the create request.

Also rejects creation with remote.storage.enable explicitly set to a
non-true value, and excludes system topics from the auto-enable logic
(they are never diskless).

Follows the same pattern as the existing diskless.enable auto-persist
logic in validConfigRecords().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
giuseppelillo pushed a commit that referenced this pull request May 29, 2026
…opic creation (#619)

When consolidation is enabled and a diskless topic is created,
automatically persist remote.storage.enable=true in the topic config
records. This ensures diskless topics always have remote storage in the
consolidated model without requiring the operator to explicitly include
it in the create request.

Also rejects creation with remote.storage.enable explicitly set to a
non-true value, and excludes system topics from the auto-enable logic
(they are never diskless).

Follows the same pattern as the existing diskless.enable auto-persist
logic in validConfigRecords().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants