ashwinpankaj commented on code in PR #15180:
URL: https://github.com/apache/kafka/pull/15180#discussion_r1469089563


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java:
##########
@@ -620,6 +650,11 @@ private boolean startTask(
 
             try (LoaderSwap loaderSwap = 
plugins.withClassLoader(connectorLoader)) {
                 final ConnectorConfig connConfig = new 
ConnectorConfig(plugins, connProps);
+
+                int maxTasks = connConfig.tasksMax();
+                int numTasks = configState.taskCount(id.connector());
+                checkTasksMax(id.connector(), numTasks, maxTasks, 
connConfig.enforceTasksMax());

Review Comment:
   @C0urante QQ - why do we need this check here in addition to connector level 
check in Worker.java ? What happens if the taskCount in configState is not up 
to date at this point , wouldn't we be running more tasks than permitted ?



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to