Calling DB::open() with create_missing_column_families=true is quadratic
sadderchris opened this issue · comments
Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
Expected behavior
Per the notes here, when calling DB::open() with create_missing_column_families=true, column family creation is batched and takes a reasonable amount of time when opening a fresh database with lots of new column families.
Actual behavior
Calling DB::open() with create_missing_column_families=true doesn't actually batch create new column families and instead is quadratic in the number of column families it needs to create.
rocksdb/db/db_impl/db_impl_open.cc
Lines 2056 to 2060 in 8b56696
Steps to reproduce the behavior
- Set options.create_missing_column_families = true
- Call DB::Open() on an empty directory and request to open a few hundred column families
- Observe that the time needed to open is between 30s - several minutes