refactor create rocksdb

This commit is contained in:
Scott E. Graves 2024-12-18 12:34:45 -06:00
parent 95b9464c9f
commit eeea09f65a
3 changed files with 10 additions and 10 deletions

View File

@ -50,9 +50,9 @@ void rdb_file_db::create_or_open(bool clear) {
db_ = utils::create_rocksdb(cfg_, "file", families, handles, clear); db_ = utils::create_rocksdb(cfg_, "file", families, handles, clear);
std::size_t idx{}; std::size_t idx{};
default_family_ = handles[idx++]; default_family_ = handles.at(idx++);
file_family_ = handles[idx++]; file_family_ = handles.at(idx++);
directory_family_ = handles[idx++]; directory_family_ = handles.at(idx++);
} }
auto rdb_file_db::add_directory(const std::string &api_path, auto rdb_file_db::add_directory(const std::string &api_path,

View File

@ -50,9 +50,9 @@ void rdb_file_mgr_db::create_or_open(bool clear) {
db_ = utils::create_rocksdb(cfg_, "file_mgr", families, handles, clear); db_ = utils::create_rocksdb(cfg_, "file_mgr", families, handles, clear);
std::size_t idx{}; std::size_t idx{};
resume_family_ = handles[idx++]; resume_family_ = handles.at(idx++);
upload_active_family_ = handles[idx++]; upload_active_family_ = handles.at(idx++);
upload_family_ = handles[idx++]; upload_family_ = handles.at(idx++);
} }
auto rdb_file_mgr_db::add_resume(const resume_entry &entry) -> bool { auto rdb_file_mgr_db::add_resume(const resume_entry &entry) -> bool {

View File

@ -50,10 +50,10 @@ void rdb_meta_db::create_or_open(bool clear) {
db_ = utils::create_rocksdb(cfg_, "provider_meta", families, handles, clear); db_ = utils::create_rocksdb(cfg_, "provider_meta", families, handles, clear);
std::size_t idx{}; std::size_t idx{};
default_family_ = handles[idx++]; default_family_ = handles.at(idx++);
pinned_family_ = handles[idx++]; pinned_family_ = handles.at(idx++);
size_family_ = handles[idx++]; size_family_ = handles.at(idx++);
source_family_ = handles[idx++]; source_family_ = handles.at(idx++);
} }
void rdb_meta_db::clear() { create_or_open(true); } void rdb_meta_db::clear() { create_or_open(true); }