add c-api for allowing FIFO compaction (#11156)

Summary:
Addressing issue https://github.com/facebook/rocksdb/issues/11079

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

Reviewed By: pdillinger

Differential Revision: D42869964

Pulled By: ajkr

fbshipit-source-id: 58214901d4e072c568d4c5cf0944a0b1c60de897
oxigraph-8.1.1
hackingthekernel 2 years ago committed by Facebook GitHub Bot
parent ccaa3225b0
commit 291300ece8
  1. 10
      db/c.cc
  2. 6
      include/rocksdb/c.h

@ -5139,6 +5139,16 @@ rocksdb_fifo_compaction_options_t* rocksdb_fifo_compaction_options_create() {
return result; return result;
} }
void rocksdb_fifo_compaction_options_set_allow_compaction(
rocksdb_fifo_compaction_options_t* fifo_opts, unsigned char allow_compaction) {
fifo_opts->rep.allow_compaction = allow_compaction;
}
unsigned char rocksdb_fifo_compaction_options_get_allow_compaction(
rocksdb_fifo_compaction_options_t* fifo_opts) {
return fifo_opts->rep.allow_compaction;
}
void rocksdb_fifo_compaction_options_set_max_table_files_size( void rocksdb_fifo_compaction_options_set_max_table_files_size(
rocksdb_fifo_compaction_options_t* fifo_opts, uint64_t size) { rocksdb_fifo_compaction_options_t* fifo_opts, uint64_t size) {
fifo_opts->rep.max_table_files_size = size; fifo_opts->rep.max_table_files_size = size;

@ -2234,6 +2234,12 @@ extern ROCKSDB_LIBRARY_API void rocksdb_universal_compaction_options_destroy(
extern ROCKSDB_LIBRARY_API rocksdb_fifo_compaction_options_t* extern ROCKSDB_LIBRARY_API rocksdb_fifo_compaction_options_t*
rocksdb_fifo_compaction_options_create(void); rocksdb_fifo_compaction_options_create(void);
extern ROCKSDB_LIBRARY_API void extern ROCKSDB_LIBRARY_API void
rocksdb_fifo_compaction_options_set_allow_compaction(
rocksdb_fifo_compaction_options_t* fifo_opts, unsigned char allow_compaction);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_fifo_compaction_options_get_allow_compaction(
rocksdb_fifo_compaction_options_t* fifo_opts);
extern ROCKSDB_LIBRARY_API void
rocksdb_fifo_compaction_options_set_max_table_files_size( rocksdb_fifo_compaction_options_set_max_table_files_size(
rocksdb_fifo_compaction_options_t* fifo_opts, uint64_t size); rocksdb_fifo_compaction_options_t* fifo_opts, uint64_t size);
extern ROCKSDB_LIBRARY_API uint64_t extern ROCKSDB_LIBRARY_API uint64_t

Loading…
Cancel
Save