jsancio commented on code in PR #12240:
URL: https://github.com/apache/kafka/pull/12240#discussion_r890538379
##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -132,15 +143,27 @@ ClusterControlManager build() {
replicaPlacer = new StripedReplicaPlacer(new Random());
}
if (controllerMetrics == null) {
- throw new RuntimeException("You must specify
controllerMetrics");
+ throw new RuntimeException("You must specify
ControllerMetrics");
+ }
+ if (featureControl == null) {
+ featureControl = new FeatureControlManager.Builder().
+ setLogContext(logContext).
+ setSnapshotRegistry(snapshotRegistry).
+ setQuorumFeatures(new QuorumFeatures(0, new ApiVersions(),
+ QuorumFeatures.defaultFeatureMap(),
+ singletonList(0))).
+ setMetadataVersion(MetadataVersion.latest()).
+ build();
Review Comment:
I see that and I review that PR too. I guess I missed it. :smile:
I think is is risky to allow the controller managers to be instantiated
without a shared feature control manager. Allowing them to get build with a
`null` feature control manager makes that more likely.
I can submit a PR to fix the changes to `ReplicationControlManager`.
--
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]