Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Benchmark storage arg to read fraction of kv pairs. #1233
Benchmark storage arg to read fraction of kv pairs. #1233
Changes from all commits
5d3a3a3
be60ff1
3a46fc9
4b417b0
1b1f1c5
c136491
d1b8666
5977abc
ef7f296
0839793
1280ca7
b1876fc
96891c5
152be9d
9e255eb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It should probably error if the result is zero.
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.
We could do something like:
If we have
number_of_keys = 0
, we use all the keys by default. Another option would be to set the minimum limit to 1. WDYT?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.
But all keys could also be empty afaik the check makes sense either way. Just returning an error is no problem.
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 the
number_of_keys
is0
that can mean either (or both)keys.len()
orself.params.db_fraction
was0
, butself.params.db_fraction
is restricted via clap arguments1..=100
so it cannot be0
, in which casekeys.iter().take(0)
is equivalent tokeys.iter()
thereby keeping the old behavior in tact. I believe there's no special case to be handled here unless we're worried someone/something overridingdb_fraction
to0
in which case that should be the thing being checked here.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.
What i am saying is that the old behaviour was probably also wrong.
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.
I dont know if we should also apply this to the child nodes. Otherwise there could be cases where one large top key pulls in a huge child tree.
WDYT @crystalin?
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.
I guess we should also do it for the
child_nodes
below.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.
I agree. Capping the vec size to db_fraction can at most double the size of potential key reads (root + child) but I presume that's still a major improvement from what it is right now.
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.
@nbaztec @ggwpez I applied it to the child nodes here and here. WDYT?