kevin-wu24 opened a new pull request, #20595:
URL: https://github.com/apache/kafka/pull/20595

   Just because a controller node sets --no-initial-controllers flag does not 
mean it is necessarily running kraft.version=1. The more precise meaning is 
that the controller node being formatted does not know what kraft version the 
cluster should be in, and therefore it is only safe to assume kraft.version=0. 
Only by setting
   --standalone,--initial-controllers, or --no-initial-controllers AND not 
specifying the controller.quorum.voters static config, is it known 
kraft.version > 0.
   
   For example, it is a valid configuration (although confusing) to run a
   static   quorum defined by controller.quorum.voters but have all the
   controllers   format with --no-initial-controllers. In this case,
   specifying --no-initial-controllers alongside a metadata version that
   does not  support kraft.version=1 causes formatting to fail, which is
   a  regression.
   
   Additionally, the formatter should not check the kraft.version against the 
release version, since kraft.version does not actually depend on any release 
version. It should only check the kraft.version against the static voters 
config/format arguments.
   
   This PR also cleans up the integration test framework to match the semantics 
of formatting an actual cluster.
   
   Reviewers: TengYao Chi <[email protected]>, Kuan-Po Tseng
    <[email protected]>, Chia-Ping Tsai <[email protected]>, José
    Armando García Sancio <[email protected]>
   Conflicts:
        core/src/main/scala/kafka/tools/StorageTool.scala
                Minor conflicts.
        core/src/test/java/kafka/server/ReconfigurableQuorumIntegrationTest.java
                Revert integration test changes to simplify PR. Some tests are 
not valid in 4.1.
        docs/ops.html
                Keep new docs changes.
        
metadata/src/test/java/org/apache/kafka/metadata/storage/FormatterTest.java
                Minor conflicts. Keep new tests.
        
test-common/test-common-runtime/src/main/java/org/apache/kafka/common/test/KafkaClusterTestKit.java
                Revert integration test changes to simplify PR.
   
   Delete this text and replace it with a detailed description of your change. 
The 
   PR title and body will become the squashed commit message.
   
   If you would like to tag individuals, add some commentary, upload images, or
   include other supplemental information that should not be part of the 
eventual
   commit message, please use a separate comment.
   
   If applicable, please include a summary of the testing strategy (including 
   rationale) for the proposed change. Unit and/or integration tests are 
expected
   for any behavior change and system tests should be considered for larger
   changes.
   


-- 
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