Skip to content

feat(inkless:config): enforce diskless feature flag dependency chain - #560

Merged
giuseppelillo merged 1 commit into
mainfrom
jeqo/enforce-flags
Apr 1, 2026
Merged

feat(inkless:config): enforce diskless feature flag dependency chain#560
giuseppelillo merged 1 commit into
mainfrom
jeqo/enforce-flags

Conversation

@jeqo

@jeqo jeqo commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Add startup validation that enforces the dependency chain between diskless feature flags:

  diskless.storage.system.enable          ← base layer, can be enabled alone
    → diskless.managed.rf.enable          ← requires diskless.storage.system.enable
      → diskless.allow.from.classic.enable ← requires managed replicas + remote log storage

Brokers now fail fast with a clear error message if flags are enabled without their prerequisites.

Rationale for requiring diskless.managed.rf.enable:

  1. Read-path after migration: consuming data that was tiered via classic remote storage needs the local UnifiedLog. Without managed replicas, that read path just returns INVALID_REQUEST — you can't read the full topic history.
  2. Migration path: InitDisklessLog needs the leader to have a local log. With legacy RF=1 and hash-based routing, there's no guarantee the broker handling the request is actually the leader with a local log. Managed replicas give you stable, deterministic leadership.

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

Adds broker startup validation in KafkaConfig to enforce a dependency chain between diskless feature flags so misconfigured brokers fail fast instead of starting with an invalid combination of settings.

Changes:

  • Add KafkaConfig.validateValues() checks enforcing diskless.storage.system.enable → diskless.managed.rf.enable → diskless.allow.from.classic.enable plus remote.log.storage.system.enable.
  • Extend InklessConfigsTest cluster init helpers to set the new diskless.managed.rf.enable broker config.
  • Add new tests intended to cover invalid flag combinations.

Reviewed changes

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

File Description
core/src/main/scala/kafka/server/KafkaConfig.scala Adds startup validation (require) enforcing the diskless feature-flag dependency chain.
core/src/test/java/kafka/server/InklessConfigsTest.java Updates test cluster config wiring for managed replicas and adds dependency validation tests.

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

Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java Outdated
Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java Outdated
Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java Outdated

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

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


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

Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java Outdated
Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java Outdated

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

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


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

Comment thread core/src/test/java/kafka/server/InklessConfigsTest.java
Add startup validation that enforces the dependency chain between
diskless feature flags:

  diskless.storage.system.enable
    → diskless.managed.rf.enable
      → diskless.allow.from.classic.enable (+ remote.log.storage.system.enable)

Brokers now fail fast with a clear error message if flags are enabled
without their prerequisites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeqo
jeqo force-pushed the jeqo/enforce-flags branch from aac6cbc to 47250c3 Compare April 1, 2026 11:47
@giuseppelillo
giuseppelillo merged commit 6597610 into main Apr 1, 2026
4 checks passed
@giuseppelillo
giuseppelillo deleted the jeqo/enforce-flags branch April 1, 2026 12:39
jeqo added a commit that referenced this pull request Apr 1, 2026
…560)

Add startup validation that enforces the dependency chain between
diskless feature flags:

  diskless.storage.system.enable
    → diskless.managed.rf.enable
      → diskless.allow.from.classic.enable (+ remote.log.storage.system.enable)

Brokers now fail fast with a clear error message if flags are enabled
without their prerequisites.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
jeqo added a commit that referenced this pull request Apr 1, 2026
…560)

Add startup validation that enforces the dependency chain between
diskless feature flags:

  diskless.storage.system.enable
    → diskless.managed.rf.enable
      → diskless.allow.from.classic.enable (+ remote.log.storage.system.enable)

Brokers now fail fast with a clear error message if flags are enabled
without their prerequisites.

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.

4 participants