mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 01:30:12 +01:00
ircd::db: Maintain SST file manager instance.
This commit is contained in:
parent
9e9a1449ee
commit
e3b2bcf19d
3 changed files with 10 additions and 0 deletions
|
@ -91,6 +91,7 @@ struct ircd::db::database
|
|||
std::shared_ptr<struct stats> stats;
|
||||
std::shared_ptr<struct events> events;
|
||||
std::shared_ptr<struct mergeop> mergeop;
|
||||
std::shared_ptr<rocksdb::SstFileManager> ssts;
|
||||
std::shared_ptr<rocksdb::Cache> cache;
|
||||
std::vector<descriptor> descriptors;
|
||||
std::vector<string_view> column_names;
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace rocksdb
|
|||
struct WriteBatch;
|
||||
struct Slice;
|
||||
struct Checkpoint;
|
||||
struct SstFileManager;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <rocksdb/utilities/checkpoint.h>
|
||||
#include <rocksdb/filter_policy.h>
|
||||
#include <rocksdb/table.h>
|
||||
#include <rocksdb/sst_file_manager.h>
|
||||
|
||||
#include <ircd/db/database/comparator.h>
|
||||
#include <ircd/db/database/prefix_transform.h>
|
||||
|
@ -370,6 +371,10 @@ try
|
|||
{
|
||||
std::make_shared<struct mergeop>(this)
|
||||
}
|
||||
,ssts
|
||||
{
|
||||
rocksdb::NewSstFileManager(env.get(), logs, {}, 0, true, nullptr, 0.05)
|
||||
}
|
||||
,cache{[this]
|
||||
() -> std::shared_ptr<rocksdb::Cache>
|
||||
{
|
||||
|
@ -457,6 +462,9 @@ try
|
|||
// Setup env
|
||||
opts.env = env.get();
|
||||
|
||||
// Setup SST file mgmt
|
||||
opts.sst_file_manager = this->ssts;
|
||||
|
||||
// Setup logging
|
||||
logs->SetInfoLogLevel(ircd::debugmode? rocksdb::DEBUG_LEVEL : rocksdb::WARN_LEVEL);
|
||||
opts.info_log_level = logs->GetInfoLogLevel();
|
||||
|
|
Loading…
Add table
Reference in a new issue