Compare commits
2 Commits
master
...
on-disk-co
Author | SHA1 | Date | |
---|---|---|---|
|
8f966f1e5e | ||
|
5c4a8d8f50 |
@ -25,7 +25,9 @@
|
|||||||
#include <rocksdb/db.h>
|
#include <rocksdb/db.h>
|
||||||
#include <rocksdb/slice.h>
|
#include <rocksdb/slice.h>
|
||||||
|
|
||||||
|
#include <rocksdb/cache.h>
|
||||||
#include <rocksdb/options.h>
|
#include <rocksdb/options.h>
|
||||||
|
#include <rocksdb/table.h>
|
||||||
#include <rocksdb/utilities/transaction.h>
|
#include <rocksdb/utilities/transaction.h>
|
||||||
#include <rocksdb/utilities/transaction_db.h>
|
#include <rocksdb/utilities/transaction_db.h>
|
||||||
|
|
||||||
@ -234,6 +236,11 @@ DiskStorage::DiskStorage(Config config)
|
|||||||
kvstore_(std::make_unique<RocksDBStorage>()),
|
kvstore_(std::make_unique<RocksDBStorage>()),
|
||||||
durable_metadata_(config) {
|
durable_metadata_(config) {
|
||||||
LoadPersistingMetadataInfo();
|
LoadPersistingMetadataInfo();
|
||||||
|
std::shared_ptr<rocksdb::Cache> cache = rocksdb::NewLRUCache(1024 * 1024 * 1024); // 1 GB
|
||||||
|
rocksdb::BlockBasedTableOptions table_options;
|
||||||
|
table_options.block_cache = cache;
|
||||||
|
kvstore_->options_.table_factory.reset(NewBlockBasedTableFactory(table_options));
|
||||||
|
|
||||||
kvstore_->options_.create_if_missing = true;
|
kvstore_->options_.create_if_missing = true;
|
||||||
kvstore_->options_.comparator = new ComparatorWithU64TsImpl();
|
kvstore_->options_.comparator = new ComparatorWithU64TsImpl();
|
||||||
kvstore_->options_.compression = rocksdb::kNoCompression;
|
kvstore_->options_.compression = rocksdb::kNoCompression;
|
||||||
|
Loading…
Reference in New Issue
Block a user