Skip to content

Commit

Permalink
fix: fix rollback by mistake for mutation_log::reset_from (apache#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
empiredan committed Nov 4, 2022
1 parent 168de46 commit 1d46590
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rdsn/src/replica/mutation_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,9 @@ error_code mutation_log::reset_from(const std::string &dir,
} else {
// Once rollback failed, dir should be recovered manually in case data is lost.
dassert_f(utils::filesystem::rename_path(temp_dir, _dir),
"rename temp dir {} back to current dir {} failed",
temp_dir,
_dir);
"rename temp dir {} back to current dir {} failed",
temp_dir,
_dir);
}
});

Expand All @@ -986,9 +986,9 @@ error_code mutation_log::reset_from(const std::string &dir,
auto dir_resolve = dsn::defer([this, dir, &err]() {
if (err != ERR_OK) {
dassert_f(utils::filesystem::rename_path(_dir, dir),
"rename current dir {} back to source dir {} failed",
_dir,
dir);
"rename current dir {} back to source dir {} failed",
_dir,
dir);
}
});

Expand Down

0 comments on commit 1d46590

Please sign in to comment.