You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2022/08/17 03:45:21 UTC
[GitHub] [incubator-pegasus] foreverneverer commented on a diff in pull request #1112: feat(backup): 4. meta server send backup_request to replica
foreverneverer commented on code in PR #1112:
URL: https://github.com/apache/incubator-pegasus/pull/1112#discussion_r947418226
##########
src/rdsn/src/common/backup.thrift:
##########
@@ -64,24 +64,28 @@ struct configuration_restore_request
9:optional string restore_path;
}
+// meta -> replica
struct backup_request
{
- 1:dsn.gpid pid;
- 2:policy_info policy;
- 3:string app_name;
- 4:i64 backup_id;
+ 1:dsn.gpid pid;
+ 2:string app_name;
+ 3:i64 backup_id;
+ 4:backup_status status;
+ 5:string backup_provider_type;
// user specified backup_path.
- 5:optional string backup_path;
+ 6:optional string backup_root_path;
}
struct backup_response
{
1:dsn.error_code err;
2:dsn.gpid pid;
- 3:i32 progress; // the progress of the cold_backup
- 4:string policy_name;
- 5:i64 backup_id;
- 6:i64 checkpoint_total_size;
+ 3:i64 backup_id;
+ 4:backup_status status;
+ 5:optional dsn.error_code checkpoint_err;
+ 6:optional dsn.error_code upload_err;
Review Comment:
why need two error_code? using one-error_code + hint is not ok?
##########
src/rdsn/src/common/backup_restore_common.cpp:
##########
@@ -36,5 +44,41 @@ const std::string backup_restore_constant::BACKUP_ID("restore.backup_id");
const std::string backup_restore_constant::SKIP_BAD_PARTITION("restore.skip_bad_partition");
const std::string backup_restore_constant::RESTORE_PATH("restore.restore_path");
+std::string get_backup_root(const std::string &backup_root,
+ const std::string &user_defined_root_path)
+{
+ if (user_defined_root_path.empty()) {
+ return backup_root;
+ }
+ return utils::filesystem::path_combine(user_defined_root_path, backup_root);
Review Comment:
if user specify root path, we should return the value, but not combine `system` + `user` path
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org