3c327ac2d0
Summary: Closes https://github.com/facebook/rocksdb/pull/2589 Differential Revision: D5431502 Pulled By: siying fbshipit-source-id: 8ebf8c87883daa9daa54b2303d11ce01ab1f6f75
30 lines
1.0 KiB
C++
30 lines
1.0 KiB
C++
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
// (found in the LICENSE.Apache file in the root directory).
|
|
|
|
#pragma once
|
|
#ifndef ROCKSDB_LITE
|
|
#include <memory>
|
|
|
|
#include "rocksdb/table_properties.h"
|
|
|
|
namespace rocksdb {
|
|
|
|
// Creates a factory of a table property collector that marks a SST
|
|
// file as need-compaction when it observe at least "D" deletion
|
|
// entries in any "N" consecutive entires.
|
|
//
|
|
// @param sliding_window_size "N". Note that this number will be
|
|
// round up to the smallest multiple of 128 that is no less
|
|
// than the specified size.
|
|
// @param deletion_trigger "D". Note that even when "N" is changed,
|
|
// the specified number for "D" will not be changed.
|
|
extern std::shared_ptr<TablePropertiesCollectorFactory>
|
|
NewCompactOnDeletionCollectorFactory(
|
|
size_t sliding_window_size,
|
|
size_t deletion_trigger);
|
|
} // namespace rocksdb
|
|
|
|
#endif // !ROCKSDB_LITE
|