mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
kv/RocksDBStore: implement rm_single_delete
Use SingleDelete to delete keys which were never overwritten. Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com>
This commit is contained in:
parent
9c60532eae
commit
2089cff5b5
@ -437,6 +437,12 @@ void RocksDBStore::RocksDBTransactionImpl::rmkey(const string &prefix,
|
||||
bat->Delete(combine_strings(prefix, k));
|
||||
}
|
||||
|
||||
void RocksDBStore::RocksDBTransactionImpl::rm_single_key(const string &prefix,
|
||||
const string &k)
|
||||
{
|
||||
bat->SingleDelete(combine_strings(prefix, k));
|
||||
}
|
||||
|
||||
void RocksDBStore::RocksDBTransactionImpl::rmkeys_by_prefix(const string &prefix)
|
||||
{
|
||||
KeyValueDB::Iterator it = db->get_iterator(prefix);
|
||||
|
@ -147,17 +147,20 @@ public:
|
||||
void set(
|
||||
const string &prefix,
|
||||
const string &k,
|
||||
const bufferlist &bl);
|
||||
const bufferlist &bl) override;
|
||||
void rmkey(
|
||||
const string &prefix,
|
||||
const string &k);
|
||||
const string &k) override;
|
||||
void rm_single_key(
|
||||
const string &prefix,
|
||||
const string &k) override;
|
||||
void rmkeys_by_prefix(
|
||||
const string &prefix
|
||||
);
|
||||
) override;
|
||||
void merge(
|
||||
const string& prefix,
|
||||
const string& k,
|
||||
const bufferlist &bl);
|
||||
const bufferlist &bl) override;
|
||||
};
|
||||
|
||||
KeyValueDB::Transaction get_transaction() {
|
||||
|
Loading…
Reference in New Issue
Block a user