server: make node join safe.
Open
status/TODO
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
Now the node join process is:
1. verify data dir is empty.
2. verify self does not exists in member list.
3. add self to member list by calling `addMember`.
4. run server.
There is a potential risk if something goes wrong between step 3 and 4, then the new node is in member list, while data dir is still empty, so it will not be able to join. What's worse, if there is only 1 node before the join, the pd cluster will stop serving due to lack of online nodes.
Contributor guide
Assessment
This issue has not been assessed yet.