Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use checkpoint to implement data snapshot when full replication #208

Merged
merged 11 commits into from
Mar 22, 2021
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: hulk <hulk.website@gmail.com>
ShooterIT and git-hulk authored Mar 20, 2021

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
commit a0c6b18530114890e1c3f7750ca503a706322f1b
4 changes: 2 additions & 2 deletions src/replication.cc
Original file line number Diff line number Diff line change
@@ -606,12 +606,12 @@ ReplicationThread::CBState ReplicationThread::fullSyncReadCB(bufferevent *bev,
auto s = Engine::Storage::ReplDataManager::CleanInvalidFiles(
self->storage_, target_dir, need_files);
if (!s.IsOK()) {
LOG(WARNING) << "[replication] Fail to clean up invalid files of old checkpoint,"
LOG(WARNING) << "[replication] Failed to clean up invalid files of the old checkpoint,"
<< " error: " << s.Msg();
LOG(WARNING) << "[replication] Try to clean all checkpoint files";
auto s = rocksdb::DestroyDB(target_dir, rocksdb::Options());
if (!s.ok()) {
LOG(WARNING) << "[replication] Fail to clean all checkpoint files, error: "
LOG(WARNING) << "[replication] Failed to clean all checkpoint files, error: "
<< s.ToString();
}
}