Skip to content

Commit

Permalink
Add C API to set avoid_unnecessary_blocking_io option (#10693)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebook/rocksdb#10693

Reviewed By: riversand963

Differential Revision: D39668399

Pulled By: ajkr

fbshipit-source-id: 66d46e5104c49d235a14e8df8eec3af285ab9752
  • Loading branch information
w41ter authored and facebook-github-bot committed Sep 23, 2022
1 parent 4a83b16 commit 1b351fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6468,6 +6468,16 @@ void rocksdb_options_set_memtable_whole_key_filtering(rocksdb_options_t* opt,
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
void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) {
delete usage;
Expand Down
5 changes: 5 additions & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,11 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_report_bg_io_stats(
rocksdb_options_t*, int);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_report_bg_io_stats(
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
rocksdb_options_set_experimental_mempurge_threshold(rocksdb_options_t*, double);
Expand Down

0 comments on commit 1b351fd

Please sign in to comment.