From 3f73d54bbd56a2878497c9aba3783958616e93cb Mon Sep 17 00:00:00 2001 From: Changjian Gao Date: Mon, 8 May 2017 22:09:06 -0700 Subject: [PATCH] Add C API to set max_file_opening_threads option Summary: Add `rocksdb_options_set_max_file_opening_threads()` API Closes https://github.com/facebook/rocksdb/pull/2184 Differential Revision: D4923090 Pulled By: lightmark fbshipit-source-id: c4ddce17733d999d426d02f7202b33a46ed6faed --- db/c.cc | 4 ++++ include/rocksdb/c.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/db/c.cc b/db/c.cc index be2700e42..924b8e0ab 100644 --- a/db/c.cc +++ b/db/c.cc @@ -1989,6 +1989,10 @@ void rocksdb_options_set_max_open_files(rocksdb_options_t* opt, int n) { opt->rep.max_open_files = n; } +void rocksdb_options_set_max_file_opening_threads(rocksdb_options_t* opt, int n) { + opt->rep.max_file_opening_threads = n; +} + void rocksdb_options_set_max_total_wal_size(rocksdb_options_t* opt, uint64_t n) { opt->rep.max_total_wal_size = n; } diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 3a5aee990..cf8eb9932 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -707,6 +707,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_db_write_buffer_size( rocksdb_options_t*, size_t); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_open_files( rocksdb_options_t*, int); +extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_file_opening_threads( + rocksdb_options_t*, int); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_total_wal_size( rocksdb_options_t* opt, uint64_t n); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_compression_options(