kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rha...@apache.org
Subject [kafka] 01/02: Changed for updatedTasks, avoids stopping and starting of unnecessary tasks (#7097)
Date Tue, 03 Sep 2019 21:31:07 GMT
This is an automated email from the ASF dual-hosted git repository.

rhauch pushed a commit to branch 2.3
in repository https://gitbox.apache.org/repos/asf/kafka.git

commit 2c7daa7654e8c5b55e7f96caf2fc7fab521bc0f7
Author: LuyingLiu <41963486+LuyingLiu@users.noreply.github.com>
AuthorDate: Wed Sep 4 04:47:17 2019 +0800

    Changed for updatedTasks, avoids stopping and starting of unnecessary tasks (#7097)
    
    Corrected the `KafkaConfigBackingStore` logic to notify of only the changed tasks, rather
than all tasks. This was not noticed before because Connect always stopped and restarted all
tasks during a rebalanced, but since 2.3 the incremental rebalance logic exposed this bug.
    
    Author: Luying Liu <lyliu@lyliu-mac.freewheelmedia.net>
    Reviewers: Konstantine Karantasis <konstantine@confluent.io>, Randall Hauch <rhauch@gmail.com>
---
 .../java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java
b/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java
index 8cf47fe..3572d8c 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java
@@ -620,7 +620,7 @@ public class KafkaConfigBackingStore implements ConfigBackingStore {
                     } else {
                         if (deferred != null) {
                             taskConfigs.putAll(deferred);
-                            updatedTasks.addAll(taskConfigs.keySet());
+                            updatedTasks.addAll(deferred.keySet());
                         }
                         inconsistent.remove(connectorName);
                     }


Mime
View raw message