]>
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 both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 #include "utilities/compaction_filters/remove_emptyvalue_compactionfilter.h"
12 #include "rocksdb/slice.h"
14 namespace ROCKSDB_NAMESPACE
{
16 bool RemoveEmptyValueCompactionFilter::Filter(int /*level*/,
18 const Slice
& existing_value
,
19 std::string
* /*new_value*/,
20 bool* /*value_changed*/) const {
21 // remove kv pairs that have empty values
22 return existing_value
.empty();
25 } // namespace ROCKSDB_NAMESPACE
26 #endif // !ROCKSDB_LITE