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 06:46:55 UTC

[GitHub] [incubator-pegasus] hycdong commented on a diff in pull request #1112: feat(backup): 4. meta server send backup_request to replica

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: 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