-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ext_proc: Support clearing the route cache #16288
Conversation
Commit Message: Support the clear_route_cache parameter on responses from the remote server Risk Level: Low. Only enabled if the flag is set. Testing: New unit test to ensure that the method is called. Docs Changes: Marked "clear_route_cache" in the API as no longer "not-implemented". Release Notes: If the clear_route_cache flag is set on a response from the external processing server, then the filter will call the "clearRouteCache" method on the filter state. Processors should set this flag if they have changed any headers, such as ":path", which may affect routing after the filter runs. Signed-off-by: Gregory Brail <[email protected]>
@@ -66,6 +69,9 @@ bool ProcessorState::handleBodyResponse(const BodyResponse& response) { | |||
modifyBufferedData([this, &response](Buffer::Instance& data) { | |||
MutationUtils::applyCommonBodyResponse(response, headers_, data); | |||
}); | |||
if (response.response().clear_route_cache()) { | |||
filter_callbacks_->clearRouteCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since routing doesn't use the body, does it make sense to clear here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the body is in buffered mode, it's possible to set headers when responding to the body callback, so it's possible that someone will want this.
Commit Message: Support the clear_route_cache parameter on responses from the remote server Risk Level: Low. Only enabled if the flag is set. Testing: New unit test to ensure that the method is called. Docs Changes: Marked "clear_route_cache" in the API as no longer "not-implemented". Release Notes: If the clear_route_cache flag is set on a response from the external processing server, then the filter will call the "clearRouteCache" method on the filter state. Processors should set this flag if they have changed any headers, such as ":path", which may affect routing after the filter runs. Signed-off-by: Gregory Brail <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Commit Message: Support the clear_route_cache parameter on responses from the remote server Risk Level: Low. Only enabled if the flag is set. Testing: New unit test to ensure that the method is called. Docs Changes: Marked "clear_route_cache" in the API as no longer "not-implemented". Release Notes: If the clear_route_cache flag is set on a response from the external processing server, then the filter will call the "clearRouteCache" method on the filter state. Processors should set this flag if they have changed any headers, such as ":path", which may affect routing after the filter runs. Signed-off-by: Gregory Brail <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Commit Message: Support the clear_route_cache parameter on responses
from the remote server
Risk Level: Low. Only enabled if the flag is set.
Testing: New unit test to ensure that the method is called.
Docs Changes: Marked "clear_route_cache" in the API as no longer
"not-implemented".
Release Notes: If the clear_route_cache flag is set on a
response from the external processing server, then the filter will
call the "clearRouteCache" method on the filter state. Processors
should set this flag if they have changed any headers, such as
":path", which may affect routing after the filter runs.
Signed-off-by: Gregory Brail [email protected]