feat(volo-thrift): improve shmipc fallback, reliability, and performance - #654
Open
shenyj3 wants to merge 6 commits into
Open
feat(volo-thrift): improve shmipc fallback, reliability, and performance#654shenyj3 wants to merge 6 commits into
shenyj3 wants to merge 6 commits into
Conversation
shenyj3
force-pushed
the
agent/shmipc-transport-fallback
branch
from
July 14, 2026 19:14
42ba042 to
5a275a0
Compare
shenyj3
marked this pull request as ready for review
July 14, 2026 19:18
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #654 +/- ##
==========================================
+ Coverage 54.11% 56.00% +1.88%
==========================================
Files 165 166 +1
Lines 22072 22446 +374
==========================================
+ Hits 11945 12570 +625
+ Misses 10127 9876 -251 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Preserve buffered reads before surfacing stream errors, close cancelled shmipc RPC streams, and prevent failed streams from returning to the pool. Refresh the polling-to-eventfd dependency revision.
shenyj3
force-pushed
the
agent/shmipc-transport-fallback
branch
from
August 19, 2026 03:49
41b76aa to
f7b1e08
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
The previous
.shmipc_fallback_address(...)implementation performed fallback insideMakeTransport, after the outer connection pool had already chosen the primary shmipc address as its key. If the shmipc attempt failed and UDS/TCP fallback succeeded, the fallback connection could be stored under the shmipc key and then reused as the wrong transport.The shmipc path also had several reliability and performance issues:
SessionManagerinstances for the same addressSolution
DialPlanandSelectedTransporttypes and a shared transport acquirer for pingpong and multiplex clients.SessionManageralready manages stream reuse.ClientBuilder::shmipc_fallback_address(...)with a per-requestDialPlaninjected throughClientContext; update the shmipc example accordingly.SessionManagerinitialization per address withOnceCell.shmipcfrom0.1.1to0.2.1and bumpvoloto0.12.4.Impact
Fallback connections are now pooled under the correct address, stream failures and cancellation no longer leak or recycle dirty shmipc streams, and buffered responses remain readable when the peer closes immediately after sending. Multi-slice shmipc responses also avoid an unnecessary memory copy.
Validation
cargo +nightly fmt --all -- --checkcargo +nightly clippy -p volo-thrift --no-default-features --features shmipc,multiplex -- --deny warningscargo +nightly test -p volo-thrift --features shmipc,multiplex(44 passed)cargo +nightly test -p volo --features shmipc(23 passed, 1 ignored)