mirror of https://github.com/facebook/rocksdb.git
Add C API to set base_backgroud_compactions
Summary: Add C API to set base_backgroud_compactions Closes https://github.com/facebook/rocksdb/pull/1571 Differential Revision: D4245709 Pulled By: yiwu-arbug fbshipit-source-id: 792c6b8
This commit is contained in:
parent
5b219eccb5
commit
00197cff39
5
db/c.cc
5
db/c.cc
|
@ -1740,6 +1740,11 @@ void rocksdb_options_set_max_background_compactions(rocksdb_options_t* opt, int
|
|||
opt->rep.max_background_compactions = n;
|
||||
}
|
||||
|
||||
void rocksdb_options_set_base_background_compactions(rocksdb_options_t* opt,
|
||||
int n) {
|
||||
opt->rep.base_background_compactions = n;
|
||||
}
|
||||
|
||||
void rocksdb_options_set_max_background_flushes(rocksdb_options_t* opt, int n) {
|
||||
opt->rep.max_background_flushes = n;
|
||||
}
|
||||
|
|
|
@ -323,6 +323,7 @@ int main(int argc, char** argv) {
|
|||
rocksdb_options_set_write_buffer_size(options, 100000);
|
||||
rocksdb_options_set_paranoid_checks(options, 1);
|
||||
rocksdb_options_set_max_open_files(options, 10);
|
||||
rocksdb_options_set_base_background_compactions(options, 1);
|
||||
table_options = rocksdb_block_based_options_create();
|
||||
rocksdb_block_based_options_set_block_cache(table_options, cache);
|
||||
rocksdb_options_set_block_based_table_factory(options, table_options);
|
||||
|
|
|
@ -585,6 +585,8 @@ rocksdb_options_set_max_write_buffer_number_to_maintain(rocksdb_options_t*,
|
|||
int);
|
||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_background_compactions(
|
||||
rocksdb_options_t*, int);
|
||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_base_background_compactions(
|
||||
rocksdb_options_t*, int);
|
||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_background_flushes(
|
||||
rocksdb_options_t*, int);
|
||||
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_log_file_size(
|
||||
|
|
Loading…
Reference in New Issue