lh0156 opened a new pull request, #23034:
URL: https://github.com/apache/kafka/pull/23034

   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`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to