From d916a1105aabd0358f802ad198520f595c4f90d3 Mon Sep 17 00:00:00 2001 From: Huachao Huang Date: Mon, 13 Aug 2018 18:34:04 -0700 Subject: [PATCH] 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 --- db/c.cc | 12 ++++++++++++ include/rocksdb/c.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/db/c.cc b/db/c.cc index ba8b7b47c..f9793ceb0 100644 --- a/db/c.cc +++ b/db/c.cc @@ -2433,6 +2433,18 @@ void rocksdb_options_set_max_write_buffer_number_to_maintain( 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) { opt->rep.max_background_compactions = n; } diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 605ed4cdf..d86b9737d 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -831,6 +831,12 @@ rocksdb_options_set_min_write_buffer_number_to_merge(rocksdb_options_t*, int); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_write_buffer_number_to_maintain(rocksdb_options_t*, 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( rocksdb_options_t*, int); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_base_background_compactions(