[ https://issues.apache.org/jira/browse/KAFKA-10493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17329387#comment-17329387 ]
Bruno Cadonna commented on KAFKA-10493: --------------------------------------- Good point about the compaction! {quote}Sounds like a step backwards? {quote} What is worse not dropping out-of-order records or not having the source topic optimization? It seems like they are not compatible. {quote}After [KIP-280|https://cwiki.apache.org/confluence/display/KAFKA/KIP-280%3A+Enhanced+log+compaction] is done, we could drop out-or-order records also with source-table materialization enabled. {quote} Streams does not have control over the source topic. So even if KIP-280 is done, Streams cannot impose a compaction strategy on the source topic. {quote}Topology optimization is already disabled by default. {quote} I know. that was just to state the defaults in the case of per-table knobs. Of course, I would regard the knobs for source topic optimization and dropping out-of-order records as expert mode. > KTable out-of-order updates are not being ignored > ------------------------------------------------- > > Key: KAFKA-10493 > URL: https://issues.apache.org/jira/browse/KAFKA-10493 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 2.6.0 > Reporter: Pedro Gontijo > Assignee: Matthias J. Sax > Priority: Blocker > Fix For: 3.0.0 > > Attachments: KTableOutOfOrderBug.java > > > 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! -- This message was sent by Atlassian Jira (v8.3.4#803005)