You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by la...@apache.org on 2022/08/12 06:38:43 UTC
[incubator-pegasus] branch backup_restore-dev updated: feat: remove all functions in backup_common (#1110)
This is an automated email from the ASF dual-hosted git repository.
laiyingchun pushed a commit to branch backup_restore-dev
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/backup_restore-dev by this push:
new efd840af1 feat: remove all functions in backup_common (#1110)
efd840af1 is described below
commit efd840af1b2222f1b1a6a467558fb60f51dfd83a
Author: HeYuchen <he...@xiaomi.com>
AuthorDate: Fri Aug 12 14:38:38 2022 +0800
feat: remove all functions in backup_common (#1110)
---
src/rdsn/src/common/backup_common.cpp | 125 --------------
src/rdsn/src/common/backup_common.h | 188 ---------------------
src/rdsn/src/common/backup_restore_common.cpp | 40 +++++
src/rdsn/src/common/backup_restore_common.h | 56 ++++++
src/rdsn/src/meta/meta_backup_engine.cpp | 7 +-
src/rdsn/src/meta/meta_backup_engine.h | 2 +-
src/rdsn/src/meta/meta_backup_service.cpp | 2 +-
src/rdsn/src/meta/server_state_restore.cpp | 6 +-
src/rdsn/src/meta/test/meta_backup_test.cpp | 2 +-
.../src/meta/test/server_state_restore_test.cpp | 2 +-
src/rdsn/src/replica/replica.cpp | 2 +-
src/rdsn/src/replica/replica_restore.cpp | 11 +-
src/rdsn/src/replica/replica_stub.cpp | 2 +-
src/rdsn/src/replica/test/replica_test.cpp | 2 +-
14 files changed, 115 insertions(+), 332 deletions(-)
diff --git a/src/rdsn/src/common/backup_common.cpp b/src/rdsn/src/common/backup_common.cpp
deleted file mode 100644
index 37c21fd48..000000000
--- a/src/rdsn/src/common/backup_common.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#include "backup_common.h"
-
-namespace dsn {
-namespace replication {
-const std::string cold_backup_constant::APP_METADATA("app_metadata");
-const std::string cold_backup_constant::APP_BACKUP_STATUS("app_backup_status");
-const std::string cold_backup_constant::CURRENT_CHECKPOINT("current_checkpoint");
-const std::string cold_backup_constant::BACKUP_METADATA("backup_metadata");
-const std::string cold_backup_constant::BACKUP_INFO("backup_info");
-const int32_t cold_backup_constant::PROGRESS_FINISHED = 1000;
-
-const std::string backup_restore_constant::FORCE_RESTORE("restore.force_restore");
-const std::string backup_restore_constant::BLOCK_SERVICE_PROVIDER("restore.block_service_provider");
-const std::string backup_restore_constant::CLUSTER_NAME("restore.cluster_name");
-const std::string backup_restore_constant::POLICY_NAME("restore.policy_name");
-const std::string backup_restore_constant::APP_NAME("restore.app_name");
-const std::string backup_restore_constant::APP_ID("restore.app_id");
-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");
-
-namespace cold_backup {
-
-std::string get_backup_path(const std::string &root, int64_t backup_id)
-{
- return root + "/" + std::to_string(backup_id);
-}
-
-std::string get_backup_info_file(const std::string &root, int64_t backup_id)
-{
- return get_backup_path(root, backup_id) + "/" + cold_backup_constant::BACKUP_INFO;
-}
-
-std::string get_replica_backup_path(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id)
-{
- std::string str_app = app_name + "_" + std::to_string(pid.get_app_id());
- return get_backup_path(root, backup_id) + "/" + str_app + "/" +
- std::to_string(pid.get_partition_index());
-}
-
-std::string get_app_meta_backup_path(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id)
-{
- std::string str_app = app_name + "_" + std::to_string(app_id);
- return get_backup_path(root, backup_id) + "/" + str_app + "/meta";
-}
-
-std::string get_app_metadata_file(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id)
-{
- return get_app_meta_backup_path(root, app_name, app_id, backup_id) + "/" +
- cold_backup_constant::APP_METADATA;
-}
-
-std::string get_app_backup_status_file(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id)
-{
- return get_app_meta_backup_path(root, app_name, app_id, backup_id) + "/" +
- cold_backup_constant::APP_BACKUP_STATUS;
-}
-
-std::string get_current_chkpt_file(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id)
-{
- return get_replica_backup_path(root, app_name, pid, backup_id) + "/" +
- cold_backup_constant::CURRENT_CHECKPOINT;
-}
-
-std::string get_remote_chkpt_dirname()
-{
- // here using server address as suffix of remote_chkpt_dirname
- std::string local_address = dsn_primary_address().ipv4_str();
- std::string port = std::to_string(dsn_primary_address().port());
- return "chkpt_" + local_address + "_" + port;
-}
-
-std::string get_remote_chkpt_dir(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id)
-{
- return get_replica_backup_path(root, app_name, pid, backup_id) + "/" +
- get_remote_chkpt_dirname();
-}
-
-std::string get_remote_chkpt_meta_file(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id)
-{
- return get_remote_chkpt_dir(root, app_name, pid, backup_id) + "/" +
- cold_backup_constant::BACKUP_METADATA;
-}
-
-} // namespace cold_backup
-} // namespace replication
-} // namespace dsn
diff --git a/src/rdsn/src/common/backup_common.h b/src/rdsn/src/common/backup_common.h
deleted file mode 100644
index 990a3fa89..000000000
--- a/src/rdsn/src/common/backup_common.h
+++ /dev/null
@@ -1,188 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#pragma once
-
-#include <string>
-#include <dsn/tool-api/gpid.h>
-#include "backup_types.h"
-#include <dsn/cpp/rpc_holder.h>
-
-namespace dsn {
-namespace replication {
-
-class cold_backup_constant
-{
-public:
- static const std::string APP_METADATA;
- static const std::string APP_BACKUP_STATUS;
- static const std::string CURRENT_CHECKPOINT;
- static const std::string BACKUP_METADATA;
- static const std::string BACKUP_INFO;
- static const int32_t PROGRESS_FINISHED;
-};
-
-typedef rpc_holder<backup_request, backup_response> backup_rpc;
-
-class backup_restore_constant
-{
-public:
- static const std::string FORCE_RESTORE;
- static const std::string BLOCK_SERVICE_PROVIDER;
- static const std::string CLUSTER_NAME;
- static const std::string POLICY_NAME;
- static const std::string APP_NAME;
- static const std::string APP_ID;
- static const std::string BACKUP_ID;
- static const std::string SKIP_BAD_PARTITION;
- static const std::string RESTORE_PATH;
-};
-
-namespace cold_backup {
-
-//
-// Attention: when compose the path on block service, we use appname_appid, because appname_appid
-// can identify the case below:
-// -- case: you create one app with name A and it's appid is 1, then after backup a time later,
-// you drop the table, then create a new app with name A and with appid 3
-// using appname_appid, can idenfity the backup data is belong to which app
-
-// The directory structure on block service
-//
-// <root>/<backup_id>/<appname_appid>/meta/app_metadata
-// /meta/app_backup_status
-// /partition_1/checkpoint@ip:port/***.sst
-// /partition_1/checkpoint@ip:port/CURRENT
-// /partition_1/checkpoint@ip:port/backup_metadata
-// /partition_1/current_checkpoint
-// <root>/<backup_id>/<appname_appid>/meta/app_metadata
-// /meta/app_backup_status
-// /partition_1/checkpoint@ip:port/***.sst
-// /partition_1/checkpoint@ip:port/CURRENT
-// /partition_1/checkpoint@ip:port/backup_metadata
-// /partition_1/current_checkpoint
-// <root>/<backup_id>/backup_info
-//
-
-//
-// the purpose of some file:
-// 1, app_metadata : the metadata of the app, the same with the app's app_info
-// 2, app_backup_status: the flag file, represent whether the app have finish backup, if this
-// file exist on block filesystem, backup is finished, otherwise, app haven't finished
-// backup, we ignore its context
-// 3, backup_metadata : the file to statistic the information of a checkpoint, include all the
-// file's name, size and md5
-// 4, current_checkpoint : specifing which checkpoint directory is valid
-// 5, backup_info : recording the information of this backup
-//
-
-// compose the path for app on block service
-// input:
-// -- root: the prefix of path
-// return:
-// the path: <root>/<backup_id>
-std::string get_backup_path(const std::string &root, int64_t backup_id);
-
-// return: <root>/<backup_id>/backup_info
-std::string get_backup_info_file(const std::string &root, int64_t backup_id);
-
-// compose the path for replica on block service
-// input:
-// -- root: the prefix of the path
-// return:
-// the path: <root>/<backup_id>/<appname_appid>/<partition_index>
-std::string get_replica_backup_path(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id);
-
-// compose the path for meta on block service
-// input:
-// -- root: the prefix of the path
-// return:
-// the path: <root>/<backup_id>/<appname_appid>/meta
-std::string get_app_meta_backup_path(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id);
-
-// compose the absolute path(AP) of app_metadata_file on block service
-// input:
-// -- prefix: the prefix of AP
-// return:
-// the AP of app meta data file:
-// <root>/<backup_id>/<appname_appid>/meta/app_metadata
-std::string get_app_metadata_file(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id);
-
-// compose the absolute path(AP) of app_backup_status file on block service
-// input:
-// -- prefix: the prefix of AP
-// return:
-// the AP of flag-file, which represent whether the app have finished backup:
-// <root>/<backup_id>/<appname_appid>/meta/app_backup_status
-std::string get_app_backup_status_file(const std::string &root,
- const std::string &app_name,
- int32_t app_id,
- int64_t backup_id);
-
-// compose the absolute path(AP) of current chekpoint file on block service
-// input:
-// -- root: the prefix of AP on block service
-// -- pid: gpid of replica
-// return:
-// the AP of current checkpoint file:
-// <root>/<backup_id>/<appname_appid>/<partition_index>/current_checkpoint
-std::string get_current_chkpt_file(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id);
-
-// compose the checkpoint directory name on block service
-// return:
-// checkpoint directory name: checkpoint@<ip:port>
-std::string get_remote_chkpt_dirname();
-
-// compose the absolute path(AP) of checkpoint dir for replica on block service
-// input:
-// -- root: the prefix of the AP
-// -- pid: gpid of replcia
-// return:
-// the AP of the checkpoint dir:
-// <root>/<backup_id>/<appname_appid>/<partition_index>/checkpoint@<ip:port>
-std::string get_remote_chkpt_dir(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id);
-
-// compose the absolute path(AP) of checkpoint meta for replica on block service
-// input:
-// -- root: the prefix of the AP
-// -- pid: gpid of replcia
-// return:
-// the AP of the checkpoint file metadata:
-// <root>/<backup_id>/<appname_appid>/<partition_index>/checkpoint@<ip:port>/backup_metadata
-std::string get_remote_chkpt_meta_file(const std::string &root,
- const std::string &app_name,
- gpid pid,
- int64_t backup_id);
-
-} // namespace cold_backup
-} // namespace replication
-} // namespace dsn
diff --git a/src/rdsn/src/common/backup_restore_common.cpp b/src/rdsn/src/common/backup_restore_common.cpp
new file mode 100644
index 000000000..36e403b59
--- /dev/null
+++ b/src/rdsn/src/common/backup_restore_common.cpp
@@ -0,0 +1,40 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "backup_restore_common.h"
+
+namespace dsn {
+namespace replication {
+const std::string cold_backup_constant::APP_METADATA("app_metadata");
+const std::string cold_backup_constant::APP_BACKUP_STATUS("app_backup_status");
+const std::string cold_backup_constant::CURRENT_CHECKPOINT("current_checkpoint");
+const std::string cold_backup_constant::BACKUP_METADATA("backup_metadata");
+const std::string cold_backup_constant::BACKUP_INFO("backup_info");
+const int32_t cold_backup_constant::PROGRESS_FINISHED = 1000;
+
+const std::string backup_restore_constant::FORCE_RESTORE("restore.force_restore");
+const std::string backup_restore_constant::BLOCK_SERVICE_PROVIDER("restore.block_service_provider");
+const std::string backup_restore_constant::CLUSTER_NAME("restore.cluster_name");
+const std::string backup_restore_constant::POLICY_NAME("restore.policy_name");
+const std::string backup_restore_constant::APP_NAME("restore.app_name");
+const std::string backup_restore_constant::APP_ID("restore.app_id");
+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");
+
+} // namespace replication
+} // namespace dsn
diff --git a/src/rdsn/src/common/backup_restore_common.h b/src/rdsn/src/common/backup_restore_common.h
new file mode 100644
index 000000000..1fc3eac92
--- /dev/null
+++ b/src/rdsn/src/common/backup_restore_common.h
@@ -0,0 +1,56 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include <string>
+#include <dsn/tool-api/gpid.h>
+#include "backup_types.h"
+#include <dsn/cpp/rpc_holder.h>
+
+namespace dsn {
+namespace replication {
+
+class cold_backup_constant
+{
+public:
+ static const std::string APP_METADATA;
+ static const std::string APP_BACKUP_STATUS;
+ static const std::string CURRENT_CHECKPOINT;
+ static const std::string BACKUP_METADATA;
+ static const std::string BACKUP_INFO;
+ static const int32_t PROGRESS_FINISHED;
+};
+
+typedef rpc_holder<backup_request, backup_response> backup_rpc;
+
+class backup_restore_constant
+{
+public:
+ static const std::string FORCE_RESTORE;
+ static const std::string BLOCK_SERVICE_PROVIDER;
+ static const std::string CLUSTER_NAME;
+ static const std::string POLICY_NAME;
+ static const std::string APP_NAME;
+ static const std::string APP_ID;
+ static const std::string BACKUP_ID;
+ static const std::string SKIP_BAD_PARTITION;
+ static const std::string RESTORE_PATH;
+};
+
+} // namespace replication
+} // namespace dsn
diff --git a/src/rdsn/src/meta/meta_backup_engine.cpp b/src/rdsn/src/meta/meta_backup_engine.cpp
index 76ef3a254..fcef8ab34 100644
--- a/src/rdsn/src/meta/meta_backup_engine.cpp
+++ b/src/rdsn/src/meta/meta_backup_engine.cpp
@@ -151,8 +151,8 @@ error_code meta_backup_engine::backup_app_meta()
std::string backup_root =
dsn::utils::filesystem::path_combine(_backup_path, _backup_service->backup_root());
- std::string file_name = cold_backup::get_app_metadata_file(
- backup_root, _cur_backup.app_name, _cur_backup.app_id, _cur_backup.backup_id);
+ // TODO(heyuchen): refactor and update it in future
+ std::string file_name = "todo";
return write_backup_file(file_name, app_info_buffer);
}
@@ -301,7 +301,8 @@ void meta_backup_engine::write_backup_info()
{
std::string backup_root =
dsn::utils::filesystem::path_combine(_backup_path, _backup_service->backup_root());
- std::string file_name = cold_backup::get_backup_info_file(backup_root, _cur_backup.backup_id);
+ // TODO(heyuchen): refactor and update it in future
+ std::string file_name = "todo";
blob buf = dsn::json::json_forwarder<backup_item>::encode(_cur_backup);
error_code err = write_backup_file(file_name, buf);
if (err == ERR_FS_INTERNAL) {
diff --git a/src/rdsn/src/meta/meta_backup_engine.h b/src/rdsn/src/meta/meta_backup_engine.h
index c389979c8..a78e88d52 100644
--- a/src/rdsn/src/meta/meta_backup_engine.h
+++ b/src/rdsn/src/meta/meta_backup_engine.h
@@ -20,7 +20,7 @@
#include <dsn/cpp/json_helper.h>
#include <dsn/tool-api/zlocks.h>
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "meta_service.h"
#include "server_state.h"
#include "meta_backup_service.h"
diff --git a/src/rdsn/src/meta/meta_backup_service.cpp b/src/rdsn/src/meta/meta_backup_service.cpp
index 695b77a1d..73a6126a9 100644
--- a/src/rdsn/src/meta/meta_backup_service.cpp
+++ b/src/rdsn/src/meta/meta_backup_service.cpp
@@ -22,7 +22,7 @@
#include <dsn/utils/time_utils.h>
#include "block_service/block_service_manager.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "meta_backup_service.h"
#include "meta_service.h"
#include "server_state.h"
diff --git a/src/rdsn/src/meta/server_state_restore.cpp b/src/rdsn/src/meta/server_state_restore.cpp
index 77d4a4bd7..e07feb586 100644
--- a/src/rdsn/src/meta/server_state_restore.cpp
+++ b/src/rdsn/src/meta/server_state_restore.cpp
@@ -21,7 +21,7 @@
#include <dsn/utility/filesystem.h>
#include "block_service/block_service_manager.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "meta_service.h"
#include "server_state.h"
@@ -54,8 +54,8 @@ void server_state::sync_app_from_backup_media(
if (!request.policy_name.empty()) {
backup_root = dsn::utils::filesystem::path_combine(backup_root, request.policy_name);
}
- std::string app_metadata = cold_backup::get_app_metadata_file(
- backup_root, request.app_name, request.app_id, request.time_stamp);
+ // TODO(heyuchen): refactor and update it in future
+ std::string app_metadata = "todo";
error_code err = ERR_OK;
block_file_ptr file_handle = nullptr;
diff --git a/src/rdsn/src/meta/test/meta_backup_test.cpp b/src/rdsn/src/meta/test/meta_backup_test.cpp
index 30a0b0fe3..b00179710 100644
--- a/src/rdsn/src/meta/test/meta_backup_test.cpp
+++ b/src/rdsn/src/meta/test/meta_backup_test.cpp
@@ -19,7 +19,7 @@
#include <dsn/utility/filesystem.h>
#include <gtest/gtest.h>
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "meta/meta_backup_service.h"
#include "meta/meta_service.h"
#include "meta/server_state.h"
diff --git a/src/rdsn/src/meta/test/server_state_restore_test.cpp b/src/rdsn/src/meta/test/server_state_restore_test.cpp
index 495a62799..6e03835f1 100644
--- a/src/rdsn/src/meta/test/server_state_restore_test.cpp
+++ b/src/rdsn/src/meta/test/server_state_restore_test.cpp
@@ -19,7 +19,7 @@
#include <dsn/utility/filesystem.h>
#include <gtest/gtest.h>
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "meta/meta_service.h"
#include "meta/server_state.h"
#include "meta_test_base.h"
diff --git a/src/rdsn/src/replica/replica.cpp b/src/rdsn/src/replica/replica.cpp
index 135d9ee09..e74a8b1c9 100644
--- a/src/rdsn/src/replica/replica.cpp
+++ b/src/rdsn/src/replica/replica.cpp
@@ -35,7 +35,7 @@
#include "split/replica_split_manager.h"
#include "replica_disk_migrator.h"
#include "runtime/security/access_controller.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include <dsn/utils/latency_tracer.h>
#include <dsn/cpp/json_helper.h>
diff --git a/src/rdsn/src/replica/replica_restore.cpp b/src/rdsn/src/replica/replica_restore.cpp
index a8e6aac0c..6c6c52f07 100644
--- a/src/rdsn/src/replica/replica_restore.cpp
+++ b/src/rdsn/src/replica/replica_restore.cpp
@@ -30,7 +30,7 @@
#include "mutation_log.h"
#include "replica_stub.h"
#include "block_service/block_service_manager.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
using namespace dsn::dist::block_service;
@@ -250,8 +250,8 @@ dsn::error_code replica::find_valid_checkpoint(const configuration_restore_reque
}
int64_t backup_id = req.time_stamp;
- std::string manifest_file =
- cold_backup::get_current_chkpt_file(backup_root, req.app_name, old_gpid, backup_id);
+ // TODO(heyuchen): refactor and update it in future
+ std::string manifest_file = "todo";
block_filesystem *fs =
_stub->_block_service_manager.get_or_create_block_filesystem(req.backup_provider_name);
if (fs == nullptr) {
@@ -295,9 +295,8 @@ dsn::error_code replica::find_valid_checkpoint(const configuration_restore_reque
std::string valid_chkpt_entry(r.buffer.data(), r.buffer.length());
ddebug_f("{}: got a valid chkpt {}", name(), valid_chkpt_entry);
- remote_chkpt_dir = ::dsn::utils::filesystem::path_combine(
- cold_backup::get_replica_backup_path(backup_root, req.app_name, old_gpid, backup_id),
- valid_chkpt_entry);
+ // TODO(heyuchen): refactor and update it in future
+ remote_chkpt_dir = ::dsn::utils::filesystem::path_combine("todo", valid_chkpt_entry);
return dsn::ERR_OK;
}
diff --git a/src/rdsn/src/replica/replica_stub.cpp b/src/rdsn/src/replica/replica_stub.cpp
index 733c98630..17cb964c0 100644
--- a/src/rdsn/src/replica/replica_stub.cpp
+++ b/src/rdsn/src/replica/replica_stub.cpp
@@ -42,7 +42,7 @@
#include "split/replica_split_manager.h"
#include "replica_disk_migrator.h"
#include "disk_cleaner.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include <boost/algorithm/string/replace.hpp>
#include <dsn/cpp/json_helper.h>
diff --git a/src/rdsn/src/replica/test/replica_test.cpp b/src/rdsn/src/replica/test/replica_test.cpp
index d97808054..eb4d81e64 100644
--- a/src/rdsn/src/replica/test/replica_test.cpp
+++ b/src/rdsn/src/replica/test/replica_test.cpp
@@ -21,7 +21,7 @@
#include <dsn/utility/filesystem.h>
#include "runtime/rpc/network.sim.h"
-#include "common/backup_common.h"
+#include "common/backup_restore_common.h"
#include "replica_test_base.h"
#include "replica/replica.h"
#include "replica/replica_http_service.h"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org