splett2 commented on code in PR #15702:
URL: https://github.com/apache/kafka/pull/15702#discussion_r1579886194
##########
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java:
##########
@@ -308,6 +328,48 @@ private ApiError validateAlterConfig(ConfigResource
configResource,
return ApiError.NONE;
}
+ void maybeTriggerPartitionUpdateOnMinIsrChange(List<ApiMessageAndVersion>
records) {
+ List<ConfigRecord> minIsrRecords = new ArrayList<>();
+ Map<String, String> topicMap = new HashMap<>();
+ Map<String, String> configRemovedTopicMap = new HashMap<>();
+ records.forEach(record -> {
+ if (MetadataRecordType.fromId(record.message().apiKey()) ==
MetadataRecordType.CONFIG_RECORD) {
+ ConfigRecord configRecord = (ConfigRecord) record.message();
+ if
(configRecord.name().equals(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG)) {
+ minIsrRecords.add(configRecord);
+ if (Type.forId(configRecord.resourceType()) == Type.TOPIC)
{
+ if (configRecord.value() == null)
topicMap.put(configRecord.resourceName(), configRecord.value());
+ else
configRemovedTopicMap.put(configRecord.resourceName(), configRecord.value());
+ }
+ }
+ }
+ });
Review Comment:
what is the behavior if the default broker config for `min.insync.replicas`
is changed?
I am not actually sure how that impacts the `min.insync.replicas` for
existing topics.
--
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]