Open sadderchris opened 1 month ago
Hello @sadderchris ,
I'm looking into C API and it looks like column family descriptors are not exposed at all. Usually where API expect column family descriptor, we pass two parameters, column_family_names
and column_family_options
. This obviously missing for rocksdb_create_column_families
. Can you please check API proposal bellow if it describe your requirements ?
rocksdb_column_family_handle_t** rocksdb_create_column_families(
rocksdb_t* db,
int num_column_families,
const char* const* column_family_names,
const rocksdb_options_t* const* column_family_options,
size_t* lencfs, char** errptr);
Radek
cc: @adamretter @pdillinger
Wouldn't this break any existing callers of rocksdb_create_column_families
? Or is backwards compatibility in the C API not a concern?
Hello @sadderchris ,
of course you are correct. Too much time in Java/C++ that I almost forgot C doesn't support overloading.
rocksdb_column_family_handle_t** rocksdb_create_column_families_with_options(
rocksdb_t* db,
int num_column_families,
const char* const* column_family_names,
const rocksdb_options_t* const* column_family_options,
size_t* lencfs, char** errptr);
Radek
Thanks for the quick turnaround, this looks like it would work for our purposes.
Expected behavior
Using the C API, I can batch create column families from column family descriptors
Actual behavior
It's possible to create a single column family (1), or a batch of column families that all use the same options (2), but not from column family descriptors
Steps to reproduce the behavior
N/A