vamossagar12 commented on code in PR #13453:
URL: https://github.com/apache/kafka/pull/13453#discussion_r1151410863


##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaStatusBackingStore.java:
##########
@@ -596,7 +596,11 @@ private void readTaskStatus(String key, byte[] value) {
         synchronized (this) {
             log.trace("Received task {} status update {}", id, status);
             CacheEntry<TaskStatus> entry = getOrAdd(id);
-            entry.put(status);
+            if (entry.canWriteSafely(status)) {

Review Comment:
   yeah this is found when the status updates are from different workers and as 
you said one of them doesn't read the fresh-er status update before sending 
it's update. It was pretty easily reproducible by the Unit test that I had 
added and the status shows up.



-- 
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