void Run() { db->VisitAllDB(this); db->GetEngine()->CommitBatchWrite(); db->GetEngine()->CompactRange(Slice(), Slice()); delete this; }
void Run() { adb->GetEngine()->BeginBatchWrite(); adb->VisitDB(dbid, this); adb->GetEngine()->CommitBatchWrite(); KeyObject start(Slice(), KV, dbid); KeyObject end(Slice(), KV, dbid + 1); Buffer sbuf, ebuf; encode_key(sbuf, start); encode_key(ebuf, end); adb->GetEngine()->CompactRange(sbuf.AsString(), ebuf.AsString()); delete this; }
int OnRawKeyValue(const Slice& key, const Slice& value) { if (count % 100 == 0) { if (count > 0) { db->GetEngine()->CommitBatchWrite(); } db->GetEngine()->BeginBatchWrite(); } count++; db->RawDel(key); return 0; }
void Run() { KeyObject start(Slice(), KV, dbid); KeyObject end(Slice(), KV, dbid + 1); Buffer sbuf, ebuf; encode_key(sbuf, start); encode_key(ebuf, end); adb->GetEngine()->CompactRange(sbuf.AsString(), ebuf.AsString()); delete this; }
void Run() { adb->GetEngine()->CompactRange(Slice(), Slice()); delete this; }