You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "C0urante (via GitHub)" <gi...@apache.org> on 2023/02/28 17:45:40 UTC

[GitHub] [kafka] C0urante commented on a diff in pull request #13287: MINOR: Refactor task change logic to AbstractHerder, reuse for standalone mode.

C0urante commented on code in PR #13287:
URL: https://github.com/apache/kafka/pull/13287#discussion_r1120511592


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerder.java:
##########
@@ -427,9 +427,8 @@ private void updateConnectorTasks(String connName) {
         }
 
         List<Map<String, String>> newTaskConfigs = recomputeTaskConfigs(connName);
-        List<Map<String, String>> oldTaskConfigs = configState.allTaskConfigs(connName);
 
-        if (!newTaskConfigs.equals(oldTaskConfigs)) {

Review Comment:
   This logic seems significantly simpler than what's currently used in `DistributedHerder:: reconfigureConnector ` and moved to `AbstractHerder::taskConfigsChanged` in this PR.
   
   Why not keep this logic instead of removing `ConfigClusterState::allTaskConfigs`?



##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:
##########
@@ -1981,6 +1966,8 @@ private void reconfigureConnector(final String connName, final Callback<Void> cb
                         }
                     });
                 }
+            } else {
+                log.debug("Skipping reconfiguration of connector {} as generated configs appear unchanged", connName);

Review Comment:
   Why not move this into `AbstractHerder::taskConfigsChanged` as well, so that it's picked up in both standalone and distributed mode?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org