expose set_skip_stats_update_on_db_open to C bindings

Summary:
It would be super helpful to not have to recompile rocksdb to get this performance tweak for mechanical disks.

I have signed the CLA.
Closes https://github.com/facebook/rocksdb/pull/2718

Differential Revision: D5606994

Pulled By: yiwu-arbug

fbshipit-source-id: c05e92bad0d03bd38211af1e1ced0d0d1e02f634
This commit is contained in:
Kent767 2017-08-11 12:13:46 -07:00 committed by Facebook Github Bot
parent 666a005f9b
commit ac098a4626
2 changed files with 6 additions and 0 deletions

View File

@ -2102,6 +2102,10 @@ void rocksdb_options_enable_statistics(rocksdb_options_t* opt) {
opt->rep.statistics = rocksdb::CreateDBStatistics();
}
void rocksdb_options_set_skip_stats_update_on_db_open(rocksdb_options_t* opt, unsigned char val) {
opt->rep.skip_stats_update_on_db_open = val;
}
void rocksdb_options_set_num_levels(rocksdb_options_t* opt, int n) {
opt->rep.num_levels = n;
}

View File

@ -763,6 +763,8 @@ rocksdb_options_set_max_bytes_for_level_multiplier_additional(
rocksdb_options_t*, int* level_values, size_t num_levels);
extern ROCKSDB_LIBRARY_API void rocksdb_options_enable_statistics(
rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_skip_stats_update_on_db_open(
rocksdb_options_t* opt, unsigned char val);
/* returns a pointer to a malloc()-ed, null terminated string */
extern ROCKSDB_LIBRARY_API char* rocksdb_options_statistics_get_string(