Skip to content

fix(inkless:controller): parse diskless.enable case-insensitively on topic creation - #846

Merged
AnatolyPopov merged 1 commit into
mainfrom
gqmelo/diskless-enable-case-insensitive-create
Oct 30, 2026
Merged

AnatolyPopov merged 1 commit into
mainfrom
gqmelo/diskless-enable-case-insensitive-create

Conversation

@gqmelo

@gqmelo gqmelo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

createTopicsDiskless picked the topics to register in the control plane by comparing the diskless.enable in a case sensitive manner, but the controller parsed that value with Boolean.parseBoolean.

A client that sends True or TRUE, such as kafka-python with a Python bool, gets a topic that is diskless in KRaft but has no rows in the control plane.

Every ListOffsets, produce, and fetch on that topic then fails with UNKNOWN_TOPIC_OR_PARTITION until the topic is deleted.

The filter now uses Boolean.parseBoolean, so it agrees with the metadata.

  • Add ControllerApisTest.testCreateDisklessTopicsCallsControlPlaneForAnyCaseOfDisklessEnable for true, True, and TRUE. The True and TRUE cases fail without the fix.
  • Run ./gradlew :core:test --tests kafka.server.ControllerApisTest: 65 tests pass.

…topic creation

`createTopicsDiskless` picked the topics to register in the control plane
by comparing the `diskless.enable` in a case sensitive manner, but the
controller parsed that value with `Boolean.parseBoolean`.

A client that sends `True` or `TRUE`, such as kafka-python with a
Python bool, gets a topic that is diskless in KRaft but has no rows in the
control plane.

Every ListOffsets, produce, and fetch on that topic then fails
with `UNKNOWN_TOPIC_OR_PARTITION` until the topic is deleted.

The filter now uses `Boolean.parseBoolean`, so it agrees with the metadata.

- Add `ControllerApisTest.testCreateDisklessTopicsCallsControlPlaneForAnyCaseOfDisklessEnable`
  for `true`, `True`, and `TRUE`. The `True` and `TRUE` cases fail without
  the fix.
- Run `./gradlew :core:test --tests kafka.server.ControllerApisTest`: 65
  tests pass.

Assisted-by: Claude Opus 5.5
@gqmelo
gqmelo marked this pull request as ready for review October 30, 2026 09:19
@gqmelo gqmelo changed the title fix(inkless:controller): parse diskless.enable case-insensitively on … fix(inkless:controller): parse diskless.enable case-insensitively on topic creation Oct 30, 2026
@AnatolyPopov
AnatolyPopov merged commit 36d3904 into main Oct 30, 2026
12 checks passed
@AnatolyPopov
AnatolyPopov deleted the gqmelo/diskless-enable-case-insensitive-create branch October 30, 2026 14:39
gqmelo added a commit that referenced this pull request Nov 5, 2026
…topic creation (#846)

`createTopicsDiskless` picked the topics to register in the control plane
by comparing the `diskless.enable` in a case sensitive manner, but the
controller parsed that value with `Boolean.parseBoolean`.

A client that sends `True` or `TRUE`, such as kafka-python with a
Python bool, gets a topic that is diskless in KRaft but has no rows in the
control plane.

Every ListOffsets, produce, and fetch on that topic then fails
with `UNKNOWN_TOPIC_OR_PARTITION` until the topic is deleted.

The filter now uses `Boolean.parseBoolean`, so it agrees with the metadata.

- Add `ControllerApisTest.testCreateDisklessTopicsCallsControlPlaneForAnyCaseOfDisklessEnable`
  for `true`, `True`, and `TRUE`. The `True` and `TRUE` cases fail without
  the fix.
- Run `./gradlew :core:test --tests kafka.server.ControllerApisTest`: 65
  tests pass.

Assisted-by: Claude Opus 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
On 4.3, `incrementalAlterConfig`, `legacyAlterConfigs`, `ReplicationControlManager#createTopics`, `Controller#createTopics`, and `ControllerApis#createTopics` take a `forwarded` flag, and `MetadataDelta` has no public constructor, only `MetadataDelta.Builder`. The tests added by #832, #835, #839, #845, #846, and #852 used the main signatures.

Assisted-by: Claude Opus 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
…topic creation (#846)

`createTopicsDiskless` picked the topics to register in the control plane
by comparing the `diskless.enable` in a case sensitive manner, but the
controller parsed that value with `Boolean.parseBoolean`.

A client that sends `True` or `TRUE`, such as kafka-python with a
Python bool, gets a topic that is diskless in KRaft but has no rows in the
control plane.

Every ListOffsets, produce, and fetch on that topic then fails
with `UNKNOWN_TOPIC_OR_PARTITION` until the topic is deleted.

The filter now uses `Boolean.parseBoolean`, so it agrees with the metadata.

- Add `ControllerApisTest.testCreateDisklessTopicsCallsControlPlaneForAnyCaseOfDisklessEnable`
  for `true`, `True`, and `TRUE`. The `True` and `TRUE` cases fail without
  the fix.
- Run `./gradlew :core:test --tests kafka.server.ControllerApisTest`: 65
  tests pass.

Assisted-by: Claude Opus 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
…topic creation (#846)

`createTopicsDiskless` picked the topics to register in the control plane
by comparing the `diskless.enable` in a case sensitive manner, but the
controller parsed that value with `Boolean.parseBoolean`.

A client that sends `True` or `TRUE`, such as kafka-python with a
Python bool, gets a topic that is diskless in KRaft but has no rows in the
control plane.

Every ListOffsets, produce, and fetch on that topic then fails
with `UNKNOWN_TOPIC_OR_PARTITION` until the topic is deleted.

The filter now uses `Boolean.parseBoolean`, so it agrees with the metadata.

- Add `ControllerApisTest.testCreateDisklessTopicsCallsControlPlaneForAnyCaseOfDisklessEnable`
  for `true`, `True`, and `TRUE`. The `True` and `TRUE` cases fail without
  the fix.
- Run `./gradlew :core:test --tests kafka.server.ControllerApisTest`: 65
  tests pass.

Assisted-by: Claude Opus 5.5
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