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

Promote rocksdb.{deleted.keys,merge.operands} to main table properties #4594

Closed
wants to merge 4 commits into from

Conversation

abhimadan
Copy link
Contributor

@abhimadan abhimadan commented Oct 26, 2018

Summary: Since the number of range deletions are reported in
TableProperties, it is confusing to not report the number of merge
operands and point deletions as top-level properties; they are
accessible through the public API, but since they are not the "main"
properties, they do not appear in aggregated table properties, or the
string representation of table properties.

This change promotes those two property keys to
rocksdb/table_properties.h, adds corresponding uint64 members for
them, deprecates the old access methods GetDeletedKeys() and
GetMergeOperands() (though they are still usable for now), and removes
InternalKeyPropertiesCollector. The property key strings are the same
as before this change, so this should be able to read DBs written from older
versions (though I haven't tested this yet).

Test Plan: make check

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

abhimadan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@abhimadan
Copy link
Contributor Author

This removes part of the public API, so I'm going to refactor this a bit to both support the new TableProperties members and the old GetDeletedKeys/GetMergeOperands functions.

@abhimadan abhimadan added the WIP Work in progress label Oct 29, 2018
@facebook-github-bot
Copy link
Contributor

@abhimadan has updated the pull request. Re-import the pull request

@abhimadan abhimadan removed the WIP Work in progress label Oct 29, 2018
@abhimadan
Copy link
Contributor Author

Added back support for the old API. Should be ready for review now.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

abhimadan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@abhimadan has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

abhimadan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@abhimadan has updated the pull request. Re-import the pull request

Summary: Since the number of range deletions are reported in
TableProperties, it is confusing to not report the number of merge
operands and point deletions as top-level properties; they are
accessible through the public API, but since they are not the "main"
properties, they do not appear in aggregated table properties, or the
string representation of table properties.

This change promotes those two property keys to
`rocksdb/table_properties.h`, adds corresponding uint64 members for
them, deprecates the old access methods
`GetDeletedKeys()` and `GetMergeOperands()`, and entirely removes
`InternalKeyTablePropertiesCollector`.

Test Plan: make check
@facebook-github-bot
Copy link
Contributor

@abhimadan has updated the pull request. Re-import the pull request

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

abhimadan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

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.

looks great!

@@ -216,6 +222,10 @@ struct TableProperties {
// Below is a list of non-basic properties that are collected by database
// itself. Especially some properties regarding to the internal keys (which
// is unknown to `table`).
//
// DEPRECATED: these properties now belong as TableProperties members. Please
Copy link
Contributor

@ajkr ajkr Oct 30, 2018

Choose a reason for hiding this comment

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

Good, we can remove these functions in the next major release (6.0).

@abhimadan abhimadan deleted the report-deleted-keys branch October 30, 2018 23:02
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.

None yet

3 participants