kafka
kafka copied to clipboard
KAFKA-13990: KRaft controller should return right features in ApiVersionResponse
More detailed description of your change
Updating metadata.version using AdminClient will fail with the following exception:
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidUpdateVersionException: Invalid update version 7 for feature metadata.version. Controller 3000 does not support this feature.
This is because we just return empty supported features in Controller ApiVersionResponse, so QuorumFeatures.reasonNotSupported
will always assume we don't support this version.
Summary of testing strategy (including rationale) KRaftClusterTest.testUpdateMetadataVersion
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
Hello @cmccabe , in #12207 you moved the validation from FeatureControlManager.replay
to FeatureControlManager.updateFeature
, but it's still failing since controller doesn't return right supported versions in ApiVersionResponse.
This is an issue of big influence since it will prevent us from upgrading KRaft cluster, also ping @hachikuji @mumrah
Thanks for finding this, @dengziming . It is a great find and definitely a 3.3 blocker.
So, the reason we didn't notice this bug earlier is that it doesn't affect single-node clusters. And in the multi-node ducktape test that I wrote, the upgrade command was failing but we didn't notice because the error code returned was 0 (success). I will open a PR to fix the kafka-features.sh return code.