Expose CancellAllBackgroundWork to C api (#6832)

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

Reviewed By: cheng-chang

Differential Revision: D21498186

Pulled By: riversand963

fbshipit-source-id: 66bb0d7c06af2bf0df3c6a09b61bca2fb81f2dd3
main
Stanislav Tkach 5 years ago committed by Facebook GitHub Bot
parent c384c08a4f
commit 70aaa9ceeb
  1. 4
      db/c.cc
  2. 3
      db/c_test.c
  3. 3
      include/rocksdb/c.h

@ -4456,6 +4456,10 @@ void rocksdb_approximate_memory_usage_destroy(rocksdb_memory_usage_t* usage) {
delete usage;
}
void rocksdb_cancel_all_background_work(rocksdb_t* db, unsigned char wait) {
CancelAllBackgroundWork(db->rep, wait);
}
} // end extern "C"
#endif // !ROCKSDB_LITE

@ -1840,6 +1840,9 @@ int main(int argc, char** argv) {
CheckNoError(err);
}
StartPhase("cancel_all_background_work");
rocksdb_cancel_all_background_work(db, 1);
StartPhase("cleanup");
rocksdb_close(db);
rocksdb_options_destroy(options);

@ -1803,6 +1803,9 @@ extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_memtable_whole_key_filtering(rocksdb_options_t*,
unsigned char);
extern ROCKSDB_LIBRARY_API void rocksdb_cancel_all_background_work(
rocksdb_t* db, unsigned char wait);
#ifdef __cplusplus
} /* end extern "C" */
#endif

Loading…
Cancel
Save