[ 
https://issues.apache.org/jira/browse/KAFKA-19442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151769#comment-18151769
 ] 

Gavin Wang commented on KAFKA-19442:
------------------------------------

Hi [~juned], I'm picking this ticket up. Did the problem come back after the 
upgrade?

One {{reduce()}} call writes the same value to the changelog and to the output 
topic. The two topics can only differ if {{u3}} was reduced twice, one of them 
against a stale store. To find out how that happened, could you share:

* the value of {{processing.guarantee}}
* whether the record cache is on ({{statestore.cache.max.bytes}} or 
{{cache.max.bytes.buffering}}) and the value of {{num.standby.replicas}}
* the log lines of the affected task around that time, in particular 
{{CommitFailedException}}, {{TaskMigratedException}} and the rebalance messages
* the records for the key in both topics with their offsets, if you still have 
them

If there is nothing new, I will resolve this as Cannot Reproduce. The known 
cause that fits 3.5.1 is KAFKA-16017, fixed in 3.6.2 and 3.7.0.

> Kafka Streams state store used an outdated value when reducing records, 
> resulting in incorrect output.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-19442
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19442
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: juned
>            Assignee: Gavin Wang
>            Priority: Major
>
> We observed a case where a reduce operation used an older version of the 
> store value  instead of the latest when processing a new input.
> Below i am describing the sequence of input and its outcome in changelog and 
> output topic
> Lets see currently there is a key,value pair  M0, in changelog & output Topic.
> and u1,u2,u3 updates are received for the same key in the same order.
> For u1,u2 all are fine
> But For u3 update , Changelog topic has the *expected Outcome* but Output 
> topic has *incorrect* data.
>  
> *{*}Sequence:{*}*
> |Step|Reduction                           |ChangelogTopic|OutputTopic |
> |------   |----------------------------|-------------------|-------------|
> |Initial |M0                                   |M0                     |
> |u1     |M1 = reduce(M0, u1)       |M1                     |M1          |
> |u2     |M2 = reduce(M1, u2)       |M2                     |M2          |
> |u3     |M3 = reduce(M2, u3)       |M3                     |❌ Actually: 
> reduce(M1, u3) |
>  
> Environment:
>  - Kafka-clients:3.5.1
>  - kafka-streams:3.5.1



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to