mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Enable Snappy compression for NodeStore backends.
* Configured via config.cfg
This commit is contained in:
committed by
Vinnie Falco
parent
83ef06748d
commit
be737e0047
@@ -71,6 +71,14 @@ public:
|
||||
options.max_open_files = keyValues["open_files"].getIntValue();
|
||||
}
|
||||
|
||||
if (! keyValues["compression"].isEmpty ())
|
||||
{
|
||||
if (keyValues["compression"].getIntValue () == 0)
|
||||
{
|
||||
options.compression = leveldb::kNoCompression;
|
||||
}
|
||||
}
|
||||
|
||||
leveldb::DB* db = nullptr;
|
||||
leveldb::Status status = leveldb::DB::Open (options, m_name, &db);
|
||||
if (!status.ok () || !db)
|
||||
|
||||
@@ -155,6 +155,14 @@ public:
|
||||
options.max_background_flushes = highThreads;
|
||||
}
|
||||
|
||||
if (! keyValues["compression"].isEmpty ())
|
||||
{
|
||||
if (keyValues["compression"].getIntValue () == 0)
|
||||
{
|
||||
options.compression = rocksdb::kNoCompression;
|
||||
}
|
||||
}
|
||||
|
||||
rocksdb::DB* db = nullptr;
|
||||
rocksdb::Status status = rocksdb::DB::Open (options, m_name, &db);
|
||||
if (!status.ok () || !db)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef RIPPLE_LEVELDB_H_INCLUDED
|
||||
#define RIPPLE_LEVELDB_H_INCLUDED
|
||||
|
||||
#define SNAPPY
|
||||
#include "leveldb/cache.h"
|
||||
#include "leveldb/filter_policy.h"
|
||||
#include "leveldb/db.h"
|
||||
|
||||
Reference in New Issue
Block a user