If two out of three nodes in TiKV fail, is the data in the remaining node still complete? Can adding two new nodes restore availability?

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

Original topic: 如果TiKV 中三个node 挂了两个,剩下的一个node中的数据还是全的吗?再添加两个新的node可以恢复可用吗?

| username: breakyang

[TiDB Usage Environment] Production Environment
[TiDB Version] v7.1.0

| username: xfworld | Original post link

Sure, refer to the documentation and operations for backup recovery:

| username: tidb菜鸟一只 | Original post link

It can be restored, but there is no guarantee that no data will be lost.

| username: zhanggame1 | Original post link

The Raft protocol considers a write committed once two out of three replicas have written it. Therefore, the third replica might or might not have written it, so if two replicas fail, there is a possibility of losing some data.

| username: redgame | Original post link

When two nodes in TiKV go down, the data in the remaining node may be affected.

| username: breakyang | Original post link

According to the Raft theory, data might be lost. Is my understanding correct?

| username: zhanggame1 | Original post link

You understand correctly, it might get lost.

| username: Kongdom | Original post link

Refer to the first-floor document for lossy recovery. Hopefully, there will be no data loss. :pray:

| username: cassblanca | Original post link

RAFT consensus protocol might lose data. The person above is correct.

| username: 大飞哥online | Original post link

Raft logic: If 2 out of 3 Raft nodes receive the log, it can be committed. If 2 out of 3 nodes fail, there are two scenarios: one where some data might be lost, and one where no data is lost.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.