Skip to content

Commit

Permalink
fix unstable problem for link Wal file (vesoft-inc#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
bright-starry-sky authored and dangleptr committed Dec 9, 2019
1 parent fef7ce8 commit 5da9299
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/kvstore/wal/FileBasedWal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ bool FileBasedWal::linkCurrentWAL(const char* newPath) {
closeCurrFile();
std::lock_guard<std::mutex> g(walFilesMutex_);
if (walFiles_.empty()) {
LOG(INFO) << idStr_ << "Create link failed, there is no wal files!";
return false;
LOG(INFO) << idStr_ << "No wal files found, skip link";
return true;
}
if (!fs::FileUtils::makeDir(newPath)) {
LOG(INFO) << idStr_ << "Link file parent dir make failed : " << newPath;
Expand Down
7 changes: 6 additions & 1 deletion src/meta/processors/admin/AdminClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,14 @@ folly::Future<Status> AdminClient::createSnapshot(GraphSpaceID spaceId, const st

folly::Promise<Status> pro;
auto f = pro.getFuture();

/**
* Don't need retry.
* Because existing checkpoint directories leads to fail again.
**/
getResponse(allHosts, 0, std::move(req), [] (auto client, auto request) {
return client->future_createCheckpoint(request);
}, 0, std::move(pro), 1 /*The snapshot operation only needs to be retried twice*/);
}, 0, std::move(pro), 0);
return f;
}

Expand Down

0 comments on commit 5da9299

Please sign in to comment.