Skip to content

quic: Update the reset reason mappings for QUIC_STREAM_CANCELLED#39007

Merged
RyanTheOptimist merged 2 commits intoenvoyproxy:mainfrom
abeyad:quic-rst-stream-error
Apr 7, 2025
Merged

quic: Update the reset reason mappings for QUIC_STREAM_CANCELLED#39007
RyanTheOptimist merged 2 commits intoenvoyproxy:mainfrom
abeyad:quic-rst-stream-error

Conversation

@abeyad
Copy link
Copy Markdown
Contributor

@abeyad abeyad commented Apr 3, 2025

Previously, the QUICHE error quic::QUIC_STREAM_CANCELLED was mapped to StreamResetReason::OverloadManager, but that was a questionable choice because the OverloadManager has specific implications (like dealing with overload and memory management of buffers).

This commit changes two things:

  1. quic::QUIC_STREAM_CANCELLED is mapped to either LocalReset or RemoteReset.
  2. StreamResetReason::OverloadManager is mapped to quic::QUIC_STREAM_EXCESSIVE_LOAD, which seems like a more appropriate choice to convey the semantics of the overload manager behavior.

Risk Level: Low
Testing: Unit/Integration
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Previously, the QUICHE error `quic::QUIC_STREAM_CANCELLED` was mapped to
`StreamResetReason::OverloadManager`, but that was a questionable choice
because the OverloadManager has specific implications (like dealing with
overload and memory management of buffers).

This commit changes two things:
 1. `quic::QUIC_STREAM_CANCELLED` is mapped to either `LocalReset` or
    `RemoteReset`.
 2. `StreamResetReason::OverloadManager` is mapped to
    `quic::QUIC_STREAM_EXCESSIVE_LOAD`, which seems like a more
    appropriate choice to convey the semantics of the overload manager
    behavior.

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Apr 3, 2025

/assign @wu-bin @RyanTheOptimist

Signed-off-by: Ali Beyad <abeyad@google.com>
Copy link
Copy Markdown
Contributor

@wu-bin wu-bin left a comment

Choose a reason for hiding this comment

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

Thanks Ali!

return quic::QUIC_STREAM_REQUEST_REJECTED;
case Http::StreamResetReason::OverloadManager:
return quic::QUIC_STREAM_CANCELLED;
return quic::QUIC_STREAM_EXCESSIVE_LOAD;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment for this error code in quic_error_codes.h says

// Peer exhibits a behavior that might be generating excessive load.
QUIC_STREAM_EXCESSIVE_LOAD = 24,

So it was originally for a different purpose. Can we update that comment in QUICHE as a follow up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Bin! Will do that in a QUICHE CL.

(std::get<0>(GetParam()).downstream_protocol == Http::CodecType::HTTP2
? Http::StreamResetReason::RemoteReset
: Http::StreamResetReason::OverloadManager));
EXPECT_EQ(response1->resetReason(), Http::StreamResetReason::RemoteReset);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice to see one less diff between H2 and H3!

@abeyad
Copy link
Copy Markdown
Contributor Author

abeyad commented Apr 3, 2025

/retest

copybara-service bot pushed a commit to google/quiche that referenced this pull request Apr 3, 2025
…ader usage.

See envoyproxy/envoy#39007 for a new Envoy usage of the error code.

PiperOrigin-RevId: 743655095
@RyanTheOptimist RyanTheOptimist merged commit 8004f05 into envoyproxy:main Apr 7, 2025
25 checks passed
@abeyad abeyad deleted the quic-rst-stream-error branch April 7, 2025 17:19
agrawroh pushed a commit to agrawroh/envoy that referenced this pull request Apr 9, 2025
…oyproxy#39007)

Previously, the QUICHE error `quic::QUIC_STREAM_CANCELLED` was mapped to
`StreamResetReason::OverloadManager`, but that was a questionable choice
because the OverloadManager has specific implications (like dealing with
overload and memory management of buffers).

This commit changes two things:
1. `quic::QUIC_STREAM_CANCELLED` is mapped to either `LocalReset` or
`RemoteReset`.
2. `StreamResetReason::OverloadManager` is mapped to
`quic::QUIC_STREAM_EXCESSIVE_LOAD`, which seems like a more appropriate
choice to convey the semantics of the overload manager behavior.

Risk Level: Low
Testing: Unit/Integration
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Ali Beyad <abeyad@google.com>
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.

3 participants