Hi Jakub, as you say, this was supposed to work according to documentation and KIP-778. Instead, the "unsafe" override is not yet implemented. For this reason, I logged a bug and proposed a documentation fix.
https://issues.apache.org/jira/browse/KAFKA-15537 Thanks for raising. Br Fede On 2023/10/01 21:19:59 Jakub Scholz wrote: > Hi, > > I have a Kraft cluster running Kafka 3.5 and using the metadata.version 3.5 > as well: > > $ bin/kafka-features.sh --bootstrap-server localhost:9092 describe > Feature: metadata.version SupportedMinVersion: 3.0-IV1 > SupportedMaxVersion: 3.5-IV2 FinalizedVersionLevel: 3.5-IV2 Epoch: 140 > > The upgrade docs <https://kafka.apache.org/documentation/#upgrade_350_kraft> > suggest that I should be able to downgrade the metadata version as long as > it is not to 3.0-3.2 versions. However, whatever version I try to downgrade > it to and whether it is safe or unsafe downgrade, it always seems to fail: > > $ ./bin/kafka-features.sh --bootstrap-server localhost:9092 downgrade > --metadata 3.4 > Could not downgrade metadata.version to 8. Invalid metadata.version 8. > Refusing to perform the requested downgrade because it might delete > metadata information. Retry using UNSAFE_DOWNGRADE if you want to force the > downgrade to proceed. > 1 out of 1 operation(s) failed. > $ ./bin/kafka-features.sh --bootstrap-server localhost:9092 downgrade > --metadata 3.4 --unsafe > Could not downgrade metadata.version to 8. Invalid metadata.version 8. > Unsafe metadata downgrade is not supported in this version. > 1 out of 1 operation(s) failed. > > And it does not really matter whether I try to downgrade to 3.4, 3.4-IV0, > 3.5-IV1. In the logs, I see the following INFO message while running the > downgrade command: > > 2023-10-01 20:59:59,910 INFO Unable to get feature level information for > controller(s): 4, 5 (org.apache.kafka.controller.QuorumFeatures) > [quorum-controller-3-event-handler] > > Not sure if that is related. The cluster seems to work fine apart from the > metadata downgrade. (The cluster I was trying it on has 3 controllers with > node IDs 3, 4, and 5) > > Anyone has an idea what I'm doing wrong? Or is this something that is not > supported? Or some bug? > > Thanks & Regards > Jakub >