Query prefetch fix - #32122
Merged
Merged
Conversation
…sdk-for-java into QueryPrefetchFix
jeet1995
requested review from
FabianMeiswinkel,
Pilchie,
aayush3011,
kirankumarkolli,
kushagraThapar,
milismsft,
simorenoh and
xinlian12
as code owners
November 12, 2022 23:12
Member
Author
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kushagraThapar
requested changes
Nov 14, 2022
kushagraThapar
left a comment
Member
There was a problem hiding this comment.
Great work @jeet1995 , thanks for fixing this issue.
The PR looks good to me, however, blocking it until we have performance benchmark numbers.
…into QueryPrefetchFix � Conflicts: � sdk/cosmos/azure-cosmos/CHANGELOG.md
Member
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kushagraThapar
approved these changes
Nov 15, 2022
kushagraThapar
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @jeet1995
please do add a changelog for jackson vulnerability fix which is also shipping in this version.
Can be done once live tests are done.
Member
Author
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
xinlian12
reviewed
Nov 15, 2022
xinlian12
reviewed
Nov 15, 2022
xinlian12
reviewed
Nov 15, 2022
xinlian12
reviewed
Nov 15, 2022
xinlian12
reviewed
Nov 15, 2022
xinlian12
approved these changes
Nov 15, 2022
xinlian12
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks for the change
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.
Description
An upstream operator such as
flatMapSequentialormergeSequentialcannot control the demand of a downstreamflatMapoperator despite aprefetchset on that upstream. This results in pages to be eagerly fetched since the downstreamflatMaprequests for 32 or 256 items.More details here: Issue: 3275
Fixes #32010
Fix
The fix is for the downstream
flatMapto have aprefetchof its own. In order to minimizeprefetchas much as possible, the downstreamflatMapshould take a prefetch of 1.Tests
Added a unit test
validatePrefetchControlto simulate the effects of eager and lazy prefetching by setting theprefetchvalue on a downstreamflatMapoperator.Benchmarking