Lucent-Wong commented on code in PR #13453: URL: https://github.com/apache/kafka/pull/13453#discussion_r1198479120
########## connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaStatusBackingStore.java: ########## @@ -608,6 +608,20 @@ private void readTaskStatus(String key, byte[] value) { synchronized (this) { log.trace("Received task {} status update {}", id, status); CacheEntry<TaskStatus> entry = getOrAdd(id); + + // During frequent rebalances, there could be a race condition because of which + // an UNASSIGNED state of a prior generation can be sent by a worker despite a + // RUNNING status in a newer generation by another worker because the first worker + // couldn't read the newer RUNNING status. This can lead to an inaccurate status + // representation even though the task might be actually running. + if (status.state() == ConnectorStatus.State.UNASSIGNED Review Comment: May I ask should it be TaskStatus.State instead of ConnectorStatus.State in this method? -- 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