refactor create rocksdb
This commit is contained in:
parent
95b9464c9f
commit
eeea09f65a
@ -50,9 +50,9 @@ void rdb_file_db::create_or_open(bool clear) {
|
||||
db_ = utils::create_rocksdb(cfg_, "file", families, handles, clear);
|
||||
|
||||
std::size_t idx{};
|
||||
default_family_ = handles[idx++];
|
||||
file_family_ = handles[idx++];
|
||||
directory_family_ = handles[idx++];
|
||||
default_family_ = handles.at(idx++);
|
||||
file_family_ = handles.at(idx++);
|
||||
directory_family_ = handles.at(idx++);
|
||||
}
|
||||
|
||||
auto rdb_file_db::add_directory(const std::string &api_path,
|
||||
|
@ -50,9 +50,9 @@ void rdb_file_mgr_db::create_or_open(bool clear) {
|
||||
db_ = utils::create_rocksdb(cfg_, "file_mgr", families, handles, clear);
|
||||
|
||||
std::size_t idx{};
|
||||
resume_family_ = handles[idx++];
|
||||
upload_active_family_ = handles[idx++];
|
||||
upload_family_ = handles[idx++];
|
||||
resume_family_ = handles.at(idx++);
|
||||
upload_active_family_ = handles.at(idx++);
|
||||
upload_family_ = handles.at(idx++);
|
||||
}
|
||||
|
||||
auto rdb_file_mgr_db::add_resume(const resume_entry &entry) -> bool {
|
||||
|
@ -50,10 +50,10 @@ void rdb_meta_db::create_or_open(bool clear) {
|
||||
db_ = utils::create_rocksdb(cfg_, "provider_meta", families, handles, clear);
|
||||
|
||||
std::size_t idx{};
|
||||
default_family_ = handles[idx++];
|
||||
pinned_family_ = handles[idx++];
|
||||
size_family_ = handles[idx++];
|
||||
source_family_ = handles[idx++];
|
||||
default_family_ = handles.at(idx++);
|
||||
pinned_family_ = handles.at(idx++);
|
||||
size_family_ = handles.at(idx++);
|
||||
source_family_ = handles.at(idx++);
|
||||
}
|
||||
|
||||
void rdb_meta_db::clear() { create_or_open(true); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user