Skip to content

http: record the stop-all filter data parks at as the latest data filter - #49485

Merged
wbpcode merged 1 commit into
envoyproxy:mainfrom
wbpcode:dev-filter-manager-latest-data-filter-on-park
Nov 20, 2026
Merged

wbpcode merged 1 commit into
envoyproxy:mainfrom
wbpcode:dev-filter-manager-latest-data-filter-on-park

Conversation

@wbpcode

@wbpcode wbpcode commented Nov 20, 2026

Copy link
Copy Markdown
Member

Commit Message: http: record the stop-all filter data parks at as the latest data filter

Additional Description:
When body data reaches a filter that returned StopAllIteration*, it parks in that filter's buffer, but the latest data filter was only recorded after the stop-all check, so it stayed at an earlier filter that had already let those bytes through. That earlier filter could still pass the modifyDecodingBuffer()/modifyEncodingBuffer() ownership assert, while the filter actually holding the data could not.

This records the latest data filter at the top of the decodeData()/encodeData() loop, before the stop-all and end_stream checks. Recording a filter the data has already passed is a no-op, so the only change is that a stop-all filter holding parked data becomes the latest data filter.

This is also a prerequisite for #48660, where the latest data filter decides which filter owns the shared buffer.

Risk Level: Low
Testing: unit tests (filter_manager_test, debug)
Docs Changes: N/A
Release Notes: N/A

@agrawroh agrawroh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for fixing it!

@agrawroh agrawroh self-assigned this Nov 20, 2026
@wbpcode
wbpcode enabled auto-merge (squash) November 20, 2026 05:11
@wbpcode
wbpcode merged commit c7c57d8 into envoyproxy:main Nov 20, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants