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

Ldb kv recover #198

Open
wants to merge 11 commits into
base: dev.1.4
Choose a base branch
from
Open

Ldb kv recover #198

wants to merge 11 commits into from

Conversation

yapple
Copy link
Collaborator

@yapple yapple commented Dec 29, 2021

support terarkdb format rollback to rocksdb

yapple added 11 commits July 7, 2021 16:14
2. add kv_combine flags to compactor command
3. in class version_edit, we add rollback_ member as a switch to  control encode process, and we check the sst' status, if we open the rollback_ switch, we will check the file's prop, like purpose, dependence, inheritance.
4. in class version_set, we add a public method manifestRollback, and we add a rollback param to the WriteSnapshot method.
2. struct SstFileMetaData add terarkdb_file member, the value is true Means the sst is a terarkdb file instead of rocksdb file
…llel compactFile

2. fix level0  FilesRangeOverlapWithCompaction issue
@@ -432,6 +435,8 @@ class VersionEdit {
bool is_open_db_;
bool is_in_atomic_group_;
uint32_t remaining_entries_;

bool rollback_ = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

调整一下变量定义的位置,尽量让所有的 bool 挨在一起

s = Status::Corruption("Unable to encode VersionEdit:" +
e.DebugString(true));
}
s = descriptor_log_->AddRecord(record);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未检查 s

@@ -101,6 +103,8 @@ struct SstFileMetaData {

uint64_t num_entries;
uint64_t num_deletions;
// true Means a terarkdb sst file instead of rocksdb file
bool non_origin_file;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

移动一下 bool 定义的位置,尽可能让 bool 全都挨着

for (auto& t : threads) {
t.join();
}
if (NonOriginFiles.size() == 0) break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行判断是否可以提前一些?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants