Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/5200
  
    Regarding the race condition you mentioned:
    hmm, I can't seem to exactly nail down the "and only first 
`successfulCommits.inc()` can be omitted because of that" case you mentioned, 
could you elaborate on that a bit more?
    
    But yes, it seems like there certainly is a race condition here, and can 
even cause an NPE on:
    
https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThread.java#L496
    
    Seems like the `nextOffsetsToCommit` and its callback instance should be 
bundled as a single `AtomicReference` here ...
    
    Would you like to open a PR for that? I wanted to ask because you 
discovered it in the first place; if not I'll open a fix for it.


---

Reply via email to