Exactly-once delivery guarantee misunderstanding #431
Unanswered
Fantom0x00F
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Hi @Fantom0x00F - let me think on this for a bit and get back to you. It's an interesting question 🙂 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have not yet had practical experience using the connector and am currently in the process of studying its working principles. During this study, I encountered a theoretical question regarding the guarantee of delivery semantics. I don't fully understand how exactly-once delivery is achieved given that the connector relies on relatively weak consistency models.
For simplicity, let's consider the following two scenarios.
Scenario 1:
In my understanding, read sequential consistency is insufficient to guarantee exactly-once delivery since sequential consistency allows reading stale records. For instance, the connector might read the current value, write a BEFORE record, insert the data, write an AFTER record, and then crash without committing the offset. After restarting the task, the sequential consistency read model allows the new connector to read the old AFTER value instead of the latest one, which could lead to data duplication.
Scenario 2:
The connector relies on a single-object consistency model to ensure delivery guarantees. However, there can be scenarios where a multi-object consistency model might be needed. For example, the connector might read data from Kafka, read an AFTER record, and then hang for a while due to various reasons. A rebalance might occur, and a new instance of the connector might start, but the old instance wouldn't be aware of this until it finishes its processing logic. As a result, there could be two instances of the connector running simultaneously, leading to conflicting writes.
Could you please advise what details or information I might be overlooking and how KafkaConnector would behave in the described situations?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions