This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
split: parent replica create child replica #291
split: parent replica create child replica #291
Changes from 1 commit
82dbc5b
451253e
4ca4947
788665b
ffbac6c
4ef854f
0002035
1ddf9d9
b4904d0
d4a5bb4
f67d2a0
85fa234
a6cf527
d3f05fa
508287d
8788128
cb1b668
6eb8166
24d165f
081d3b6
dc281d3
12882e4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有明白这个循环的意思, 可以加下注释吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数的意思是得到replica存储数据的data_dir,若不存在则为其分配data_dir, _options.data_dirs是在https://github.com/XiaoMi/rdsn/blob/master/src/dist/replication/common/replication_common.cpp#L131 定义的,这个循环中还会检查data_dir是否冲突,因为一个replica只能分配一个data_dir,这个函数我没有改动逻辑,只是重构一下