C0urante commented on code in PR #16053:
URL: https://github.com/apache/kafka/pull/16053#discussion_r1628456824
##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java:
##########
@@ -1123,6 +1125,24 @@ private void processTasksCommitRecord(String
connectorName, SchemaAndValue value
connectorTaskConfigGenerations.compute(connectorName,
(ignored, generation) -> generation != null ? generation + 1 : 0);
}
inconsistent.remove(connectorName);
+
+ Map<String, String> rawConnectorConfig =
connectorConfigs.get(connectorName);
+ Map<String, String> appliedConnectorConfig;
+ if (configTransformer != null) {
+ try {
+ appliedConnectorConfig =
configTransformer.transform(rawConnectorConfig);
Review Comment:
Great catch! I've tweaked the PR to lazily apply config providers only when
we actually make use of applied connector configs (i.e., when checking to see
if we should publish a new set of task configs).
This does come with a small downside in that config transformation takes
place a little bit later than it could, so it may take longer for a new set of
task configs to be published if a connector config changes as a result of new
values being applied by its config provider. But I'm hopeful that this can be
left as a follow-up task if the basic approach in my latest commit looks good.
Eager to hear your thoughts!
--
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]