diff --git a/include/ircd/db/database/database.h b/include/ircd/db/database/database.h index d5b03c8b7..004c1369c 100644 --- a/include/ircd/db/database/database.h +++ b/include/ircd/db/database/database.h @@ -91,6 +91,7 @@ struct ircd::db::database std::shared_ptr stats; std::shared_ptr events; std::shared_ptr mergeop; + std::shared_ptr ssts; std::shared_ptr cache; std::vector descriptors; std::vector column_names; diff --git a/include/ircd/db/database/rocksdb.h b/include/ircd/db/database/rocksdb.h index 552397035..d7996b81a 100644 --- a/include/ircd/db/database/rocksdb.h +++ b/include/ircd/db/database/rocksdb.h @@ -30,6 +30,7 @@ namespace rocksdb struct WriteBatch; struct Slice; struct Checkpoint; + struct SstFileManager; } // diff --git a/ircd/db.cc b/ircd/db.cc index c39f3a8fd..d9a52178e 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -370,6 +371,10 @@ try { std::make_shared(this) } +,ssts +{ + rocksdb::NewSstFileManager(env.get(), logs, {}, 0, true, nullptr, 0.05) +} ,cache{[this] () -> std::shared_ptr { @@ -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();