impl(spanner): add transaction to channel affinity for multiplexed sesssions#15261
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15261 +/- ##
==========================================
- Coverage 92.93% 92.92% -0.01%
==========================================
Files 2394 2394
Lines 215384 215461 +77
==========================================
+ Hits 200163 200225 +62
- Misses 15221 15236 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| std::shared_ptr<SpannerStub> stub; | ||
| if (session->is_multiplexed()) { | ||
| stub = session_pool_->GetStub(*session, ctx); | ||
| } else { | ||
| stub = session_pool_->GetStub(*session); | ||
| } |
There was a problem hiding this comment.
The same code to get stub appears multiple times, maybe we can consider to make a helper function.
There was a problem hiding this comment.
Good call. I will look into doing that as part of the next multiplexed session PR.
scotthart
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on @cuiy0006)
| std::shared_ptr<SpannerStub> stub; | ||
| if (session->is_multiplexed()) { | ||
| stub = session_pool_->GetStub(*session, ctx); | ||
| } else { | ||
| stub = session_pool_->GetStub(*session); | ||
| } |
There was a problem hiding this comment.
Good call. I will look into doing that as part of the next multiplexed session PR.
fixes #15220
This change is