mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix: fix s3 load snapshot (#3717)
This commit is contained in:
parent
6f3da56e75
commit
b9ff6934e8
1 changed files with 4 additions and 4 deletions
|
@ -999,13 +999,13 @@ void ServerFamily::FlushAll(ConnectionContext* cntx) {
|
|||
// error (if any occured) with a future.
|
||||
std::optional<fb2::Future<GenericError>> ServerFamily::Load(string_view load_path,
|
||||
LoadExistingKeys existing_keys) {
|
||||
fs::path path(load_path);
|
||||
std::string path(load_path);
|
||||
|
||||
if (load_path.empty()) {
|
||||
fs::path dir_path(GetFlag(FLAGS_dir));
|
||||
string filename = GetFlag(FLAGS_dbfilename);
|
||||
dir_path.append(filename);
|
||||
path = dir_path;
|
||||
path = dir_path.generic_string();
|
||||
}
|
||||
|
||||
DCHECK_GT(shard_count(), 0u);
|
||||
|
@ -1016,7 +1016,7 @@ std::optional<fb2::Future<GenericError>> ServerFamily::Load(string_view load_pat
|
|||
return future;
|
||||
}
|
||||
|
||||
auto paths_result = snapshot_storage_->LoadPaths(path.generic_string());
|
||||
auto paths_result = snapshot_storage_->LoadPaths(path);
|
||||
if (!paths_result) {
|
||||
LOG(ERROR) << "Failed to load snapshot: " << paths_result.error().Format();
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ std::optional<fb2::Future<GenericError>> ServerFamily::Load(string_view load_pat
|
|||
|
||||
std::vector<std::string> paths = *paths_result;
|
||||
|
||||
LOG(INFO) << "Loading " << path.generic_string();
|
||||
LOG(INFO) << "Loading " << path;
|
||||
|
||||
auto new_state = service_.SwitchState(GlobalState::ACTIVE, GlobalState::LOADING);
|
||||
if (new_state != GlobalState::LOADING) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue