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
feat(bulk_load): add bulk load manager for meta #986
Merged
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
Dec 13, 2021
src/meta/meta_bulk_load_service.cpp
Outdated
@@ -101,6 +111,8 @@ void bulk_load_service::on_start_bulk_load(start_bulk_load_rpc rpc) | |||
request.file_provider_type, | |||
request.remote_root_path); | |||
|
|||
// clean old bulk load result |
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.
clean --> clear or clean up
levy5307
reviewed
Dec 13, 2021
@@ -234,21 +246,31 @@ void bulk_load_service::create_app_bulk_load_dir(const std::string &app_name, | |||
ainfo.cluster_name = req.cluster_name; | |||
ainfo.file_provider_type = req.file_provider_type; | |||
ainfo.remote_root_path = req.remote_root_path; | |||
blob value = dsn::json::json_forwarder<app_bulk_load_info>::encode(ainfo); | |||
ainfo.is_ever_ingesting = false; | |||
ainfo.bulk_load_err = ERR_OK; | |||
|
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.
auto bulk_load_path = get_app_bulk_load_path(app_id);
_meta_svc->get_meta_storage()->delete_node_recursively(
bulk_load_path, [this, rpc, ainfo]() {
ddebug_f("remove app({}) bulk load dir {} succeed", ainfo.app_name, bulk_load_path);
......
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.
"delete_node_recursively" need a r-value, so I can't pass bulk_load_path in to lambda.
hycdong
reviewed
Dec 17, 2021
hycdong
reviewed
Dec 20, 2021
foreverneverer
previously approved these changes
Dec 20, 2021
hycdong
approved these changes
Dec 24, 2021
levy5307
approved these changes
Dec 24, 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.
No description provided.