]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
10 #include "rocksdb/slice.h"
11 #include "utilities/compaction_filters/remove_emptyvalue_compactionfilter.h"
15 const char* RemoveEmptyValueCompactionFilter::Name() const {
16 return "RemoveEmptyValueCompactionFilter";
19 bool RemoveEmptyValueCompactionFilter::Filter(int level
,
21 const Slice
& existing_value
,
22 std::string
* new_value
,
23 bool* value_changed
) const {
25 // remove kv pairs that have empty values
26 return existing_value
.empty();
29 } // namespace rocksdb
30 #endif // !ROCKSDB_LITE