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
|
@ -34,11 +34,17 @@ class Statistics;
|
|||
} // namespace rocksdb
|
||||
|
||||
namespace td {
|
||||
|
||||
struct RocksDbOptions {
|
||||
std::shared_ptr<rocksdb::Statistics> statistics = nullptr;
|
||||
uint64 block_cache_size = 1 << 30;
|
||||
};
|
||||
|
||||
class RocksDb : public KeyValue {
|
||||
public:
|
||||
static Status destroy(Slice path);
|
||||
RocksDb clone() const;
|
||||
static Result<RocksDb> open(std::string path, std::shared_ptr<rocksdb::Statistics> statistics = nullptr);
|
||||
static Result<RocksDb> open(std::string path, RocksDbOptions options = {});
|
||||
|
||||
Result<GetStatus> get(Slice key, std::string &value) override;
|
||||
Status set(Slice key, Slice value) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue