mannoopj commented on code in PR #21122:
URL: https://github.com/apache/kafka/pull/21122#discussion_r2620472489
##########
server/src/main/java/org/apache/kafka/server/SimpleApiVersionManager.java:
##########
@@ -67,19 +69,19 @@ public ApiMessageType.ListenerType listenerType() {
@Override
public ApiVersionsResponse apiVersionResponse(int throttleTimeMs, boolean
alterFeatureLevel0) {
- FinalizedFeatures currentFeatures = features();
+ Optional<FinalizedFeatures> currentFeatures = featuresProvider.get();
return new ApiVersionsResponse.Builder()
.setThrottleTimeMs(throttleTimeMs)
.setApiVersions(apiVersions)
.setSupportedFeatures(brokerFeatures)
- .setFinalizedFeatures(currentFeatures.finalizedFeatures())
-
.setFinalizedFeaturesEpoch(currentFeatures.finalizedFeaturesEpoch())
+
.setFinalizedFeatures(currentFeatures.map(FinalizedFeatures::finalizedFeatures).orElse(Map.of()))
Review Comment:
the only other places `SimpleApiVersionManager` gets called are from tests
and `KRaftMetadataRequestBenchmark` so changing the default to
`FinalizedFeatures.UNKNOWN_FINALIZED_FEATURES` shouldn't change any behaviors
here
--
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]