You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/10/19 05:42:55 UTC
[incubator-doris] 09/14: [Bug] Fix bug that BE will crash when
backup using S3 (#6855)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-0.15
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit 986bd1abdc7a2c96b72b57afc99a39f7fa69b427
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Sun Oct 17 22:54:42 2021 +0800
[Bug] Fix bug that BE will crash when backup using S3 (#6855)
---
be/src/runtime/snapshot_loader.cpp | 6 +++---
be/src/runtime/snapshot_loader.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/be/src/runtime/snapshot_loader.cpp b/be/src/runtime/snapshot_loader.cpp
index 3284493..e3f5f35 100644
--- a/be/src/runtime/snapshot_loader.cpp
+++ b/be/src/runtime/snapshot_loader.cpp
@@ -49,7 +49,7 @@ SnapshotLoader::SnapshotLoader(ExecEnv* env, int64_t job_id, int64_t task_id,
_task_id(task_id),
_broker_addr(broker_addr),
_prop(broker_prop) {
- _storage_backend.reset(new BrokerStorageBackend(_env, broker_addr, broker_prop));
+ _storage_backend.reset(new BrokerStorageBackend(_env, _broker_addr, _prop));
}
SnapshotLoader::SnapshotLoader(ExecEnv* env, int64_t job_id, int64_t task_id)
@@ -66,10 +66,10 @@ SnapshotLoader::SnapshotLoader(ExecEnv* env, int64_t job_id, int64_t task_id, co
_task_id(task_id),
_broker_addr(TNetworkAddress()),
_prop(prop) {
- _storage_backend.reset(new S3StorageBackend(prop));
+ _storage_backend.reset(new S3StorageBackend(_prop));
}
-SnapshotLoader::~SnapshotLoader() {}
+SnapshotLoader::~SnapshotLoader() = default;
Status SnapshotLoader::upload(const std::map<std::string, std::string>& src_to_dest_path,
std::map<int64_t, std::vector<std::string>>* tablet_files) {
diff --git a/be/src/runtime/snapshot_loader.h b/be/src/runtime/snapshot_loader.h
index 8f4bd6c..12acc66 100644
--- a/be/src/runtime/snapshot_loader.h
+++ b/be/src/runtime/snapshot_loader.h
@@ -103,8 +103,8 @@ private:
ExecEnv* _env;
int64_t _job_id;
int64_t _task_id;
- const TNetworkAddress& _broker_addr;
- const std::map<std::string, std::string>& _prop;
+ const TNetworkAddress _broker_addr;
+ const std::map<std::string, std::string> _prop;
std::unique_ptr<StorageBackend> _storage_backend;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org