Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10493

KTable out-of-order updates are not being ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Won't Fix
    • 2.6.0
    • None
    • streams
    • None

    Description

      On a materialized KTable, out-of-order records for a given key (records which timestamp are older than the current value in store) are not being ignored but used to update the local store value and also being forwarded.

      I believe the bug is here: https://github.com/apache/kafka/blob/2.6.0/streams/src/main/java/org/apache/kafka/streams/state/internals/ValueAndTimestampSerializer.java#L77 It should return true, not false (see javadoc)

      The bug impacts here: https://github.com/apache/kafka/blob/2.6.0/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableSource.java#L142-L148

      I have attached a simple stream app that shows the issue happening.

      Thank you!

      Attachments

        1. out-of-order-table.png
          34 kB
          Nicholas Telford
        2. KTableOutOfOrderBug.java
          3 kB
          Pedro Gontijo

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pedrong Pedro Gontijo
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: