Allow simple/async sessions to request data as needed #662
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.
Optimizing record buffer for
AutoPullResponseHandler
. Simple and Async sessions will now buffer records in a similar way to the reactive sessions by only requesting more records when the Query's consumer is close to catching up. This prevents excessive records being buffered by the driver/client.The driver will request additional records when the current buffer contains less than 30% of the fetchSize (
LOW_RECORD_WATERMARK
). When the driver has buffered more than 70% of the fetchSize (HIGH_RECORD_WATERMARK
), the driver will stop requesting more records until it drops below theLOW_RECORD_WATERMARK
. AfetchSize
of zero effectively disables this buffering.