Skip to content

Ldb kv recover#198

Open
yapple wants to merge 11 commits into
dev.1.4from
ldb_kv_recover
Open

Ldb kv recover#198
yapple wants to merge 11 commits into
dev.1.4from
ldb_kv_recover

Conversation

@yapple
Copy link
Copy Markdown
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
Comment thread db/version_edit.h
bool is_in_atomic_group_;
uint32_t remaining_entries_;

bool rollback_ = false;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Comment thread db/version_set.cc
s = Status::Corruption("Unable to encode VersionEdit:" +
e.DebugString(true));
}
s = descriptor_log_->AddRecord(record);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

未检查 s

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

Choose a reason for hiding this comment

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

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

Comment thread tools/ldb_cmd.cc
for (auto& t : threads) {
t.join();
}
if (NonOriginFiles.size() == 0) break;
Copy link
Copy Markdown
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