c-api: add some missing options

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/4267

Differential Revision: D9309505

Pulled By: anand1976

fbshipit-source-id: eb9fee8037f4ff24dc1cdd5cc5ef41c231a03e1f
This commit is contained in:
Huachao Huang 2018-08-13 18:34:04 -07:00 committed by Facebook Github Bot
parent f3d91a0b57
commit d916a1105a
2 changed files with 18 additions and 0 deletions

12
db/c.cc
View File

@ -2433,6 +2433,18 @@ void rocksdb_options_set_max_write_buffer_number_to_maintain(
opt->rep.max_write_buffer_number_to_maintain = n; opt->rep.max_write_buffer_number_to_maintain = n;
} }
void rocksdb_options_set_enable_pipelined_write(rocksdb_options_t* opt, unsigned char v) {
opt->rep.enable_pipelined_write = v;
}
void rocksdb_options_set_max_subcompactions(rocksdb_options_t* opt, uint32_t n) {
opt->rep.max_subcompactions = n;
}
void rocksdb_options_set_max_background_jobs(rocksdb_options_t* opt, int n) {
opt->rep.max_background_jobs = n;
}
void rocksdb_options_set_max_background_compactions(rocksdb_options_t* opt, int n) { void rocksdb_options_set_max_background_compactions(rocksdb_options_t* opt, int n) {
opt->rep.max_background_compactions = n; opt->rep.max_background_compactions = n;
} }

View File

@ -831,6 +831,12 @@ rocksdb_options_set_min_write_buffer_number_to_merge(rocksdb_options_t*, int);
extern ROCKSDB_LIBRARY_API void extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_max_write_buffer_number_to_maintain(rocksdb_options_t*, rocksdb_options_set_max_write_buffer_number_to_maintain(rocksdb_options_t*,
int); int);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_enable_pipelined_write(
rocksdb_options_t*, unsigned char);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_subcompactions(
rocksdb_options_t*, uint32_t);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_background_jobs(
rocksdb_options_t*, int);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_background_compactions( extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_background_compactions(
rocksdb_options_t*, int); rocksdb_options_t*, int);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_base_background_compactions( extern ROCKSDB_LIBRARY_API void rocksdb_options_set_base_background_compactions(