Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling DB::open() with create_missing_column_families=true is quadratic #12886

Open
sadderchris opened this issue Jul 25, 2024 · 0 comments
Open

Comments

@sadderchris
Copy link

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.

// missing column family, create it
ColumnFamilyHandle* handle = nullptr;
impl->mutex_.Unlock();
s = impl->CreateColumnFamily(cf.options, cf.name, &handle);
impl->mutex_.Lock();

Steps to reproduce the behavior

  1. Set options.create_missing_column_families = true
  2. Call DB::Open() on an empty directory and request to open a few hundred column families
  3. Observe that the time needed to open is between 30s - several minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant