chore(spanner): wire routing feedback and cooldown tracking for unary RPCs - #6749
Conversation
… RPCs Connect live RPC feedback into LocationRouter and LatencyRegistry for all unary database RPCs in Spanner Omni location-aware routing: - Record latency and repair cooldown failure tiers on successful direct RPCs. - Trigger endpoint cooldown with server-recommended retry delays and record latency error penalties on ResourceExhausted and Unavailable failures. - Guard against placing default gateway fallback connections on cooldown. - Add RequestRoutingGroupUid trait to associate hint-bearing requests with their covering Paxos group UID, cleanly handling unkeyed requests. - Recursively extract gRPC status codes and retry delays across GAX Status, nested Error::exhausted instances, HTTP headers, and TonicStatus.
There was a problem hiding this comment.
Code Review
This pull request implements RPC execution feedback recording for Spanner request routing. It introduces the record_routing_feedback mechanism to update the LocationRouter and LatencyRegistry with latency and cooldown information based on RPC success or failure (specifically handling ResourceExhausted and Unavailable errors). It also adds a RequestRoutingGroupUid trait to extract routing group UIDs from various request types, enhances error parsing in retry_delay.rs to extract status codes and retry delays from nested errors, and includes comprehensive unit and integration mock tests to verify the feedback, cooldown, and fallback behaviors. As there are no review comments, I have no further feedback to provide.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6749 +/- ##
==========================================
+ Coverage 96.94% 96.95% +0.01%
==========================================
Files 315 315
Lines 105078 105261 +183
==========================================
+ Hits 101864 102057 +193
+ Misses 3214 3204 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Connect live RPC feedback into LocationRouter and LatencyRegistry for all unary database RPCs in Spanner Omni location-aware routing: