Are there edge conditions where TiKV loses consistency?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiKV是否存在损失一致性的边缘条件?

| username: zhenchuan9r

[TiDB Usage Environment] Production Environment
[TiDB Version] 5.4.2
I’m sorry, I am not very familiar with the specific implementation of TiKV.
I would like to ask, are there any edge conditions in TiKV that could lead to consistency loss?
For example, in the Raft protocol, if a log entry is written to the leader node and the leader crashes before this log entry is synchronized to the follower nodes, and then a new leader is elected, are there any specific edge conditions that could cause data inconsistency among the nodes after the new leader is elected?
Thank you!

| username: xfworld | Original post link

The most basic point of the Raft protocol is that a commit is considered successful only with the agreement of more than half (meaning the majority of nodes will have this data).

So, if a certain node goes down, there will still be other replicas available;

Additionally, the leader of a replica and the leader of a node are not the same concept. Even if a certain node goes down, the existence of multiple replicas allows for reinitialization and synchronization.

| username: yiduoyunQ | Original post link

In CAP, TiDB adheres to CP and ensures A as much as possible.