Repository navigation
feat(volo-thrift): record RPC transport fallback in the context - #679
Open
Joshuahoky wants to merge 3 commits into
Open
Joshuahoky wants to merge 3 commits into
Joshuahoky wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #679 +/- ##
=======================================
Coverage 63.36% 63.37%
=======================================
Files 167 167
Lines 22940 22941 +1
=======================================
+ Hits 14537 14538 +1
Misses 8403 8403 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
junliurs
reviewed
Oct 28, 2026
| ) -> Result<Self::Response, Self::Error> { | ||
| let oneway = cx.message_type == TMessageType::OneWay; | ||
| // A retried context must not report the previous attempt's fallback state. | ||
| cx.extensions.remove::<TransportFallback>(); |
Contributor
There was a problem hiding this comment.
需要加 #[cfg(feature = "shmipc")] 吗
Joshuahoky
force-pushed
the
feat/thrift-transport-fallback
branch
from
October 29, 2026 12:54
b7fb9f1 to
ed13b02
Compare
Joshuahoky
force-pushed
the
feat/thrift-transport-fallback
branch
from
November 6, 2026 04:23
ed13b02 to
af72093
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
shmipc has an in-session fallback: when a stream cannot get a shared-memory buffer it flips into a sticky fallback state and sends the payload over the session's UDS/TCP socket. The RPC still targets a shmipc address, so metrics layers that derive their transport tag from the address keep reporting
shmipceven though the transport used was UDS.Solution
volo::net::shmipc::ShmipcHelper::fallback_state()to expose the stream's flagvolo_thrift::transport::ShmipcPayloadFallback, a shmipc-only context market into the context extension written by the pingpong transports. It is only inserted when the stream carried the request or response over the session socket instead of shared memoryConsumers can then read
cx.extensions().contains::<ShmipcPayloadFallback>().