Adds the limit for the deferred stream's queue size
Fixes the issue with streaming: if the rate of consuming data by the client is slower than the rate of streaming data by the server, the server prefetches too much data from the source.
Proposed solution is to limit the queue size (size of the result buffer) in DeferredWorkState.
Changes:
- size of the queue in
DeferredWorkStatehas a limit now; - action of registering
DeferredExecutionTaskis unbound from its starting with newTaskDispatcherclass; - previous
DeferredExecutionTaskhas to complete before starting the new one inDeferredStream.
Codecov Report
Attention: 25 lines in your changes are missing coverage. Please review.
Comparison is base (
acffe7b) 73.15% compared to head (0decfd5) 73.13%. Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6852 +/- ##
==========================================
- Coverage 73.15% 73.13% -0.02%
==========================================
Files 2499 2499
Lines 126162 126170 +8
==========================================
- Hits 92292 92273 -19
- Misses 33870 33897 +27
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 73.13% <55.35%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
We still have this on the back log. I will soon start work on the defer / stream part and then we will have a look at this.