chore(spanner): implement location router and transaction affinity tracking - #6276
chore(spanner): implement location router and transaction affinity tracking#6276olavloite wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the LocationRouter module to handle Spanner client request routing, including transaction affinity tracking, key range cache lookups, endpoint cooldowns, and default fallback connections. The feedback suggests addressing a potential memory leak risk in the unbounded AffinityTracker by implementing a bounded cache or ensuring cleanup on drop, and simplifying a comparison expression for better readability.
…acking Implements `LocationRouter`, the core connection resolution engine for location-aware routing in the Spanner Rust client.
a62e035 to
f20a36c
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the LocationRouter module in the Spanner client routing system, which resolves the optimal server connection for a given request context by evaluating transaction affinity, querying the key range cache, and bypassing endpoints currently on cooldown. A comprehensive suite of unit tests is also added to verify its behavior. There are no review comments, and I have no feedback to provide.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6276 +/- ##
========================================
Coverage 96.24% 96.25%
========================================
Files 280 281 +1
Lines 72146 72483 +337
========================================
+ Hits 69440 69770 +330
- Misses 2706 2713 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Implements
LocationRouter, the core connection resolution engine for location-aware routing in the Spanner Rust client.