hycdong commented on code in PR #1112:
URL: https://github.com/apache/incubator-pegasus/pull/1112#discussion_r947511356
##########
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 will return `root_path/backup_root`, otherwise
return backup_root, backup_root is actually the cluster name.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]