This will compact the entire store; it will be slow!
Signed-off-by: Sage Weil <sage@inktank.com>
return db->create_and_open(out);
}
+ void compact() {
+ db->compact();
+ }
+
MonitorDBStore(const string& path) : db(0) {
string::const_reverse_iterator rit;
int pos = 0;
int init(ostream &out, bool create_if_missing);
public:
+ /// compact the underlying leveldb store
+ void compact() {
+ db->CompactRange(NULL, NULL);
+ }
+
/**
* options_t: Holds options which are minimally interpreted
* on initialization and then passed through to LevelDB.