add bytelimit for prefetch (release-7.2)#8798
Merged
Merged
Conversation
* add bytelimit for prefetch A fraction of byteLimit will be used as the limit to fetch index. For the indexes fetched, fetch records for them in batch. byteLimit always count the index size, it also count record if exist, it at least return 1 index-record entry and always include the last entry despite that adding the last entry despite it might exceed limit. There is a Knob STRICTLY_ENFORCE_BYTE_LIMIT, when it is set, records will be discarded once the byteLimit is hit, despite they are fetched. Otherwise, return the whole batch.
jzhou77
approved these changes
Nov 11, 2022
jzhou77
reviewed
Nov 11, 2022
| } | ||
|
|
||
| // reset it to default | ||
| (const_cast<ServerKnobs*> SERVER_KNOBS)->STRICTLY_ENFORCE_BYTE_LIMIT = false; |
Collaborator
There was a problem hiding this comment.
It's better to save the default value and restore from that, because the default may not be false (e.g., after a change) and then this is wrong.
Contributor
Author
There was a problem hiding this comment.
sounds good, will have another PR for this change
halfprice
approved these changes
Nov 11, 2022
| init( QUICK_GET_VALUE_FALLBACK, true ); | ||
| init( QUICK_GET_KEY_VALUES_FALLBACK, true ); | ||
| init( MAX_PARALLEL_QUICK_GET_VALUE, 50 ); if ( randomize && BUGGIFY ) MAX_PARALLEL_QUICK_GET_VALUE = deterministicRandom()->randomInt(1, 100); | ||
| init( STRICTLY_ENFORCE_BYTE_LIMIT, false); if( randomize && BUGGIFY ) STRICTLY_ENFORCE_BYTE_LIMIT = deterministicRandom()->coinflip() ? false : true; |
Contributor
There was a problem hiding this comment.
nit, it's better to make it aligned with other knobs.
Contributor
Author
There was a problem hiding this comment.
it is aligned in my IDE, and also called clang-format, not sure what is going on here..
Collaborator
There was a problem hiding this comment.
clang-format was turned off for this block.
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Author
not related |
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Collaborator
Doxense CI Report for Windows 10
|
Contributor
Author
not related |
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS BigSur 11.5.2
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Author
|
still unrelated joshua failure |
Contributor
Result of foundationdb-pr-macos-m1 on macOS BigSur 11.5.2
|
Contributor
Result of foundationdb-pr-macos on macOS Monterey 12.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Collaborator
Doxense CI Report for Windows 10
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
backport #8768
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branchormainif this is the youngest branch)