kevin-wu24 commented on code in PR #21122:
URL: https://github.com/apache/kafka/pull/21122#discussion_r2608471270


##########
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:
   Actually, if we pass the kraft.version information here, we can set the 
finalized features field with the `kraft.version` here whenever 
`currentFeatures.isEmpty()`.



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