mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add option --celldb-cache-size (#988)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
136b99b8d1
commit
1433f23eff
9 changed files with 62 additions and 19 deletions
|
@ -88,7 +88,13 @@ void CellDbIn::start_up() {
|
|||
statistics_ = td::RocksDb::create_statistics();
|
||||
statistics_flush_at_ = td::Timestamp::in(60.0);
|
||||
}
|
||||
cell_db_ = std::make_shared<td::RocksDb>(td::RocksDb::open(path_, statistics_).move_as_ok());
|
||||
td::RocksDbOptions db_options;
|
||||
db_options.statistics = statistics_;
|
||||
if (opts_->get_celldb_cache_size()) {
|
||||
db_options.block_cache_size = opts_->get_celldb_cache_size().value();
|
||||
LOG(WARNING) << "Set CellDb block cache size to " << td::format::as_size(db_options.block_cache_size);
|
||||
}
|
||||
cell_db_ = std::make_shared<td::RocksDb>(td::RocksDb::open(path_, std::move(db_options)).move_as_ok());
|
||||
|
||||
|
||||
boc_ = vm::DynamicBagOfCellsDb::create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue