如果没有新增数据是否会每次启动时重复发送快照?
- Dominant language
- C++
- Stars
- 4.2k
- Forks
- 923
- PR merge metrics
- No merged PRs in 30d
Description
LogManager中的_last_snapshot_id并没有持久化,所以每次启动时_last_snapshot_id都为0
在以下场景中:
1. ABC三副本
2. AB启动后写入数据
3. AB停止写入数据
4. 启动C
5. leader向C发送快照
6. ABC全部重启,并且A或B选为Leader
7. Leader向C写入become leader时的那个config时,C中没有任何的Log。所以对于任意的Index,get_term时返回的都是0,,会再触发一次snapshot。
不知道上述场景理解的正不正确。如果正确的话是不是意味着如果没有新增数据C每次重启时都要收一遍snapshot?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing LogManager::_last_snapshot_id and get_term through the reported three-replica restart sequence. Reproduce the sequence if possible and determine whether a replica with no log receives the same snapshot again; done means the behavior is confirmed or disproved and any required change is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100