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

Create C API function to iterate over WriteBatch for custom Column Families #12718

Conversation

konstantinvilin
Copy link
Contributor

@konstantinvilin konstantinvilin commented May 31, 2024

Create C API function for iterating over WriteBatch for custom Column Families

Summary:
Adding function to C API that exposes column family specific methods to iterate over WriteBatch: put_cf, delete_cf and merge_cf. This is required when the one needs to read changes for any non-default column family. Without that functionality it is impossible to iterate over changes in WAL that are relevant to custom column families.

Fixes #12790

Testing:
Added WriteBatch iteration test to "columnfamilies" section of C API unit tests

… Families

Summary:

Adding function to C API that exposes column family specific methods to iterate over WriteBatch: put_cf, delete_cf and merge_cf. This is required when the one needs to read changes for any non-default column family. Without that functionality it is impossible to iterate over changes in WAL that are relevant to custom column families.

Testing:

Added WriteBatch iteration test to "columnfamilies" section of C API unit tests
@konstantinvilin konstantinvilin changed the title Create C API function for iterating over WriteBatch for custom Column Families Create C API function to iterate over WriteBatch for custom Column Families Jun 4, 2024
Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

LGTM!

db/c.cc Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

db/c.cc Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@konstantinvilin has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@konstantinvilin
Copy link
Contributor Author

Is there something I need to do to fix Facebook Internal - Linter failing? I cannot see what is the problem.

@ajkr
Copy link
Contributor

ajkr commented Jul 9, 2024

Is there something I need to do to fix Facebook Internal - Linter failing? I cannot see what is the problem.

No, it's complaining about an existing pattern, so I will merge it as is.

@facebook-github-bot
Copy link
Contributor

@ajkr merged this pull request in 5ecb927.

@konstantinvilin
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

Impossible to iterate over non-default column family updates in WriteBatch using C API.
3 participants