I read a lot of articles about Kafka and still don't understand. In a few words my questions is: is it possible, to have message in physical files in Replicas(Followers) meanwhile Partition Leader thinks that message is unacknowledged?
In details: Say: rf=3, min.isr=2, acks=all.
- Producer sends message to partition leader (kafka instance).
- Followers periodically come to leader and fetch messages.
- Each replica saves message to disk, and after that sends ack to producer.
- Leader receives enough acks and sends ack to producer.
Now what if: On step 3, replica saves message to disk(page cache+flush) and then can NOT send ack(packet loss, network problem, or just process crash). Leader will think that replica didn't persist message, and will send reject to producer. Meanwhile replica has the message on disk in segment (in physical file). In this case we have a problem. Producer and Leader think that message was not stored, but actually replica saved it (and other replicas could save it too).
I read a lot of articles and watched a lot of videos. Checked source, but too much to check. I reviewed existed questions, and they didn't have answers.