Beispiel #1
0
				void Run()
				{
					db->VisitAllDB(this);
					db->GetEngine()->CommitBatchWrite();
					db->GetEngine()->CompactRange(Slice(), Slice());
					delete this;
				}
Beispiel #2
0
				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;
				}
Beispiel #3
0
				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;
				}
Beispiel #4
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;
				}
Beispiel #5
0
				void Run()
				{
					adb->GetEngine()->CompactRange(Slice(), Slice());
					delete this;
				}