Skip to content

Commit

Permalink
platform bridge: add additional debug logging on async resume (#1399)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Nino <[email protected]>
  • Loading branch information
junr03 authored Apr 23, 2021
1 parent b87d0c1 commit a438be0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion library/common/extensions/filters/http/platform_bridge/filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void PlatformBridgeFilter::resumeEncoding() {
}

void PlatformBridgeFilter::FilterBase::onResume() {
ENVOY_LOG(trace, "PlatformBridgeFilter({})::onResume", parent_.filter_name_);
ENVOY_LOG(debug, "PlatformBridgeFilter({})::onResume", parent_.filter_name_);

if (iteration_state_ == IterationState::Ongoing) {
return;
Expand Down Expand Up @@ -504,6 +504,8 @@ void PlatformBridgeFilter::FilterBase::onResume() {
"returned to resume filter iteration");
replaceHeaders(*pending_headers_, *result.pending_headers);
pending_headers_ = nullptr;
ENVOY_LOG(debug, "PlatformBridgeFilter({})->on_resume_ process headers free#1",
parent_.filter_name_);
free(result.pending_headers);
}

Expand All @@ -514,9 +516,13 @@ void PlatformBridgeFilter::FilterBase::onResume() {
internal_buffer->drain(internal_buffer->length());
internal_buffer->addBufferFragment(
*Buffer::BridgeFragment::createBridgeFragment(*result.pending_data));
ENVOY_LOG(debug, "PlatformBridgeFilter({})->on_resume_ process data free#1",
parent_.filter_name_);
free(result.pending_data);
} else if (result.pending_data) {
addData(*result.pending_data);
ENVOY_LOG(debug, "PlatformBridgeFilter({})->on_resume_ process data free#2",
parent_.filter_name_);
free(result.pending_data);
}

Expand All @@ -525,9 +531,13 @@ void PlatformBridgeFilter::FilterBase::onResume() {
"be returned to resume filter iteration");
replaceHeaders(*pending_trailers_, *result.pending_trailers);
pending_trailers_ = nullptr;
ENVOY_LOG(debug, "PlatformBridgeFilter({})->on_resume_ process trailers free#1",
parent_.filter_name_);
free(result.pending_trailers);
} else if (result.pending_trailers) {
addTrailers(*result.pending_trailers);
ENVOY_LOG(debug, "PlatformBridgeFilter({})->on_resume_ process trailers free#2",
parent_.filter_name_);
free(result.pending_trailers);
}

Expand Down

0 comments on commit a438be0

Please sign in to comment.