Skip to content

fix: allow diskless+remote.storage on creation when allow-switch flag is on - #691

Merged
jeqo merged 1 commit into
mainfrom
tvainika/restore-consolidated-topics
Jul 9, 2026
Merged

fix: allow diskless+remote.storage on creation when allow-switch flag is on#691
jeqo merged 1 commit into
mainfrom
tvainika/restore-consolidated-topics

Conversation

@tvainika

@tvainika tvainika commented Jul 9, 2026

Copy link
Copy Markdown
Member

Extend isDisklessConsolidationModeOnCreation() to permit topic creation with both diskless=on and remote.storage=on when either the consolidation flag OR the allow-from-classic flag is enabled. This matches the tiered storage unification semantics where allow-switch + ts-consolidation are equivalent.

@tvainika tvainika changed the title fix: allow diskless+remote.storage on creation when allow-switch flag… fix: allow diskless+remote.storage on creation when allow-switch flag is on Jul 9, 2026
@tvainika
tvainika requested a review from Copilot July 9, 2026 11:20

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

Extends Kafka log config validation to allow creating topics with both diskless.enable=true and remote.storage.enable=true when either remote-storage consolidation is enabled or the “allow-from-classic” (allow-switch) flag is enabled, aligning topic-creation validation with tiered storage unification semantics.

Changes:

  • Broadened isDisklessConsolidationModeOnCreation() to accept either consolidation or allow-from-classic as the creation-time gate for diskless+remote.
  • Updated validation comment to reflect the expanded creation-time exception semantics.
  • Added a unit test covering allow-from-classic-only behavior at topic creation.

Reviewed changes

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

File Description
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java Allows diskless+remote topic creation when either consolidation or allow-from-classic is enabled.
core/src/test/scala/unit/kafka/log/LogConfigTest.scala Adds test coverage for allow-from-classic permitting diskless+remote at creation.

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

Comment thread core/src/test/scala/unit/kafka/log/LogConfigTest.scala Outdated
… is on

Extend isDisklessConsolidationModeOnCreation() to permit topic creation with
both diskless=on and remote.storage=on when either the consolidation flag OR
the allow-from-classic flag is enabled. This matches the tiered storage
unification semantics where allow-switch + ts-consolidation are equivalent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tvainika
tvainika force-pushed the tvainika/restore-consolidated-topics branch from 76676c3 to d2ae570 Compare July 9, 2026 12:20
@tvainika
tvainika marked this pull request as ready for review July 9, 2026 13:34
@tvainika
tvainika requested a review from jeqo July 9, 2026 13:53
@jeqo
jeqo merged commit 764fa37 into main Jul 9, 2026
9 of 13 checks passed
@jeqo
jeqo deleted the tvainika/restore-consolidated-topics branch July 9, 2026 14:01
jeqo pushed a commit that referenced this pull request Jul 20, 2026
…n when allow-switch flag is on (#691)

Extend isDisklessConsolidationModeOnCreation() to permit topic creation with
both diskless=on and remote.storage=on when either the consolidation flag OR
the allow-from-classic flag is enabled. This matches the tiered storage
unification semantics where allow-switch + ts-consolidation are equivalent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jeqo pushed a commit that referenced this pull request Jul 20, 2026
…n when allow-switch flag is on (#691)

Extend isDisklessConsolidationModeOnCreation() to permit topic creation with
both diskless=on and remote.storage=on when either the consolidation flag OR
the allow-from-classic flag is enabled. This matches the tiered storage
unification semantics where allow-switch + ts-consolidation are equivalent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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