Skip to content

KAFKA-15367: Test non-JBOD to JBOD transition - #23034

Open
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-15367-non-jbod-to-jbod-test
Open

KAFKA-15367: Test non-JBOD to JBOD transition#23034
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-15367-non-jbod-to-jbod-test

Conversation

@lh0156

@lh0156 lh0156 commented Aug 2, 2026

Copy link
Copy Markdown

Corresponding JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-15367

What is the purpose of this change?

Add an integration regression test for a broker transitioning from non-JBOD metadata to JBOD-supported metadata. Before IBP_3_7_IV2, the controller's broker registration must not contain log directories. After upgrading to IBP_3_7_IV2, the broker must re-register and publish the directory ID that it actually loaded.

This verifies the externally observable behavior handled by BrokerRegistrationTracker, rather than only asserting that the metadata-version update request succeeded.

Brief change log

  • Start a one-broker, one-controller KRaft cluster with IBP_3_7_IV1.
  • Assert that the broker registration initially has no directories.
  • Upgrade metadata.version to IBP_3_7_IV2.
  • Assert that the broker re-registers with the loaded directory UUID.

Testing

  • TDD: added the state-transition assertions first; the test fixture's formatting behavior was then accounted for by deriving the expected UUID from the broker's loaded LogManager state.
  • ./gradlew :server:test --tests org.apache.kafka.server.KRaftClusterTest.testNonJbodToJbodTransition --no-build-cache --console=plain
  • ./gradlew :server:test --tests org.apache.kafka.server.KRaftClusterTest --no-build-cache --console=plain
  • ./gradlew spotlessCheck --no-build-cache --console=plain
  • git diff --check

Generated-by: OpenAI Codex (GPT-5)
@github-actions github-actions Bot added triage PRs from the community core Kafka Broker tests Test fixes (including flaky tests) small Small PRs labels Aug 2, 2026
@github-actions

Copy link
Copy Markdown

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker needs-attention small Small PRs tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant