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

kv/RocksDBStore: Configure compact-on-deletion for all CFs #55676

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

baergj
Copy link

@baergj baergj commented Feb 20, 2024

update_column_family_options() is called only for non-default CFs, whereas load_rocksdb_options() sets options for all CFs, including default. This isn't really a problem for new installs, where the default CF isn't used for very much, but for upgrades where resharding has not yet happened, the bulk of rocksdb data is still in the default CF and so it's important that it also gets compact-on-deletion configured, if desired.

Fixes: https://tracker.ceph.com/issues/64511

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@baergj baergj requested a review from a team as a code owner February 20, 2024 21:30
@github-actions github-actions bot added the core label Feb 20, 2024
@baergj
Copy link
Author

baergj commented Feb 20, 2024

Before changes:

2024-02-20T21:48:35.805+0000 7f7938faa200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [default]:
2024-02-20T21:48:35.805+0000 7f7938faa200  4 rocksdb:                   Options.table_properties_collectors:

After:

2024-02-20T21:44:13.097+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [default]:
2024-02-20T21:44:13.097+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;

@baergj
Copy link
Author

baergj commented Feb 20, 2024

jenkins test make check

@markhpc
Copy link
Member

markhpc commented Feb 21, 2024

@baergj It's been a little while since I've looked at how column families have options set. Just to be sure, did you verify it's still working properly for the non-default column families?

@baergj
Copy link
Author

baergj commented Feb 21, 2024

@markhpc Yup! Here's the full output for the after case:

2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [default]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [m-0]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [m-1]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [m-2]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [p-0]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [p-1]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [p-2]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [O-0]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [O-1]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb: [column_family.cc:552] --------------- Options for column family [O-2]:
2024-02-20T21:44:25.902+0000 7f325fcc7200  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector;

Copy link
Member

@markhpc markhpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@baergj baergj changed the title kv/RocksDBStore: Configured compact-on-deletion for all CFs kv/RocksDBStore: Configure compact-on-deletion for all CFs Feb 25, 2024
update_column_family_options() is called only for non-default CFs,
whereas load_rocksdb_options() sets options for all CFs, including
default. This isn't really a problem for new installs, where the default
CF isn't used for very much, but for upgrades where resharding has not
yet happened, the bulk of rocksdb data is still in the default CF and so
it's important that it also gets compact-on-deletion configured, if
desired.

Fixes: https://tracker.ceph.com/issues/64511
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
Copy link
Contributor

@ifed01 ifed01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@amathuria
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants