Add C API to set avoid_unnecessary_blocking_io option (#10693)

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

Reviewed By: riversand963

Differential Revision: D39668399

Pulled By: ajkr

fbshipit-source-id: 66d46e5104c49d235a14e8df8eec3af285ab9752
main
walter 2 years ago committed by Facebook GitHub Bot
parent 4a83b16ce3
commit 1b351fd9fe
  1. 10
      db/c.cc
  2. 5
      include/rocksdb/c.h

@ -6468,6 +6468,16 @@ void rocksdb_options_set_memtable_whole_key_filtering(rocksdb_options_t* opt,
opt->rep.memtable_whole_key_filtering = val; opt->rep.memtable_whole_key_filtering = val;
} }
void rocksdb_options_set_avoid_unnecessary_blocking_io(rocksdb_options_t* opt,
unsigned char val) {
opt->rep.avoid_unnecessary_blocking_io = val;
}
unsigned char rocksdb_options_get_avoid_unnecessary_blocking_io(
rocksdb_options_t* opt) {
return opt->rep.avoid_unnecessary_blocking_io;
}
// deletes container with memory usage estimates // deletes container with memory usage estimates
void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) { void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) {
delete usage; delete usage;

@ -1551,6 +1551,11 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_report_bg_io_stats(
rocksdb_options_t*, int); rocksdb_options_t*, int);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_report_bg_io_stats( extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_report_bg_io_stats(
rocksdb_options_t*); rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_avoid_unnecessary_blocking_io(rocksdb_options_t*,
unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_options_get_avoid_unnecessary_blocking_io(rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_experimental_mempurge_threshold(rocksdb_options_t*, double); rocksdb_options_set_experimental_mempurge_threshold(rocksdb_options_t*, double);

Loading…
Cancel
Save