Bruno Cadonna created KAFKA-15297:
-------------------------------------

             Summary: Cache flush order might not be topological order 
                 Key: KAFKA-15297
                 URL: https://issues.apache.org/jira/browse/KAFKA-15297
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 3.4.0
            Reporter: Bruno Cadonna
         Attachments: minimal_example.png

The flush order of the state store caches in Kafka Streams might not correspond 
to the topological order of the state stores in the topology. The order depends 
on how the processors and state stores are added to the topology. 
In some cases downstream state stores might be flushed before upstream state 
stores. That means, that during a commit records in upstream caches might end 
up in downstream caches that have already been flushed during the same commit. 
If a crash happens at that point, those records in the downstream caches are 
lost. Those records are lost for two reasons:

1. Records in caches are only changelogged after they are flushed from the 
cache. However, the downstream caches have already been flushed and they will 
not be flushed again during the same commit.

2. The offsets of the input records that caused the records that now are 
blocked in the downstream caches are committed during the same commit and so 
they will not be re-processed after the crash.

An example for a topology where the flush order of the caches is wrong is the 
following:




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to