-
Notifications
You must be signed in to change notification settings - Fork 471
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
sstable: add range keys to sstable.Layout #1410
Conversation
The `sstable.Layout` struct contains information pertaining to the layout of an sstable. Add the range key block to the layout. Related to cockroachdb#1339.
@@ -133,9 +133,9 @@ type Properties struct { | |||
// Total raw key size. | |||
RawKeySize uint64 `prop:"rocksdb.raw.key.size"` | |||
// Total raw rangekey key size. | |||
RawRangeKeyKeySize uint64 `prop:"pebble.raw.rangekey.key.size"` | |||
RawRangeKeyKeySize uint64 `prop:"pebble.raw.range-key.key.size"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two changes are purely cosmetic, and make the range key property names consistent (i.e. hyphenated).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this PR reminded me of one more range-key block change that we should consider doing: the *sstable.Reader
type has an EstimateDiskUsage
method. If the sstable has range keys, I think we should check if the range key block contains any range keys that overlap with the key span passed to EstimateDiskUsage
. If there are, we should add the entire length of the range-key block to the estimate returned.
Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jbowens and @sumeerbhola)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are, we should add the entire length of the range-key block to the estimate returned.
Ack. Will ensure we're tracking this task.
TFTRs!
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @nicktrav)
The
sstable.Layout
struct contains information pertaining to thelayout of an sstable. Add the range key block to the layout.
Related to #1339.