This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
refactor: refactor replication_options initialize function #831
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
levy5307
reviewed
May 20, 2021
src/common/replication_common.cpp
Outdated
return; | ||
} | ||
|
||
ddebug_f("data_dirs_black_list_file[{}] found, apply it", fname.c_str()); |
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.
ddebug_f("data_dirs_black_list_file[{}] found, apply it", fname);
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.
This pr is for refactor, so I copy old code into the new functions. I will update it.
acelyc111
previously approved these changes
May 22, 2021
LGTM |
levy5307
previously approved these changes
May 28, 2021
acelyc111
reviewed
May 28, 2021
acelyc111
reviewed
May 28, 2021
Co-authored-by: Yingchun Lai <[email protected]>
Co-authored-by: Yingchun Lai <[email protected]>
Co-authored-by: Yingchun Lai <[email protected]>
acelyc111
approved these changes
May 31, 2021
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.
LGTM
levy5307
approved these changes
Jun 2, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This pull request refactor part of function
replication_options::initialize
. This function will get options from config and store them including replica data directory (data_dirs). To get data_dirs,initialize
will first parseconfig[data_dirs]
, then read black_list file, finally exclude the directories in black list. This pr add three functions to implement them, called:get_data_dir_and_tag
,get_data_dirs_in_black_list
andcheck_if_in_black_list
, besides, add unit tests for those functions.