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
main
Kent767 7 years ago committed by Facebook Github Bot
parent 666a005f9b
commit ac098a4626
  1. 4
      db/c.cc
  2. 2
      include/rocksdb/c.h

@ -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;
}

@ -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(

Loading…
Cancel
Save