dynamic_modules: trigger downstream watermark callbacks when terminal #41485
+227
−32
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.
Commit Message: dynamic_modules: trigger downstream watermark callbacks when terminal
Additional Description:
Currently, dynamic modules have no way of knowing when the downstream buffers are filling to be able to apply response backpressure. This is notably important for terminal filters that actually generate the response.
On the flip side, non-terminal filters shouldn't need it. I considered making filters opt-in to the callbacks but felt the terminal filter knob may be enough of a signal and kept it simple. This comes from reading the flow control doc and its notion that the router filter opts into notifications to avoid
"number of streams * number of filters" callbacks- I think terminal dynamic modules are the equivalent of router in this context. Let me know any thoughts.envoy/source/docs/flow_control.md
Line 88 in 6ab1e7a
Risk Level: Low
Testing: Integration test
Docs Changes:
Release Notes: N/A
Platform Specific Features: N/A
Fixes #41432
/cc @mathetake @wbpcode