Conversation
…block - Tip-leader routing: a request pinned to a block above every routed upstream's known head is tried first on the tier:fallback upstreams whose head already reached it (their newHeads keep their pollers current), then on the routed list. It takes the per-request escalation, so other hedge legs and retries do not escape; the sweep that took it still escapes once to the fallbacks it has not tried. No-op when a routed head is unknown or at the block, for consensus, and with failover off. Leaders must match the use-upstream selector and their enforced availability bounds. Counted in erpc_network_tip_leader_route_total. - Hedge keeper: once a request has escalated, an all-missing ErrUpstreamsExhausted is not kept, so a leg that only re-swept the routed upstreams cannot cancel a leg still waiting on a fallback. If every leg misses, the hedge returns the last result. - Future-block short-circuit (served-tip): skip the synthetic null when a reachable fallback already has the block, except for consensus.
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.
Summary
tier:fallbackupstreams whose head already reached it, then on the routed list. When a fallback'snewHeadsleads, clients call at blocks the routed upstreams don't have yet, and today those calls fail on the routed upstreams first. Counted inerpc_network_tip_leader_route_total.ErrUpstreamsExhaustedis no longer kept, so a hedge leg that only re-swept the routed upstreams can't cancel the leg still waiting on a fallback.Still one escalation per request. No-op for consensus, with failover off, or when a routed head is unknown or at the block. Leaders respect
use-upstreamand their availability bounds.Test plan
TestFailover_TipLeaderRoutingand related tests (15 scenarios), each failing without its fix;TestFailover_*passes under-racego test ./erpc/ ./common/ ./upstream/ ./telemetry/: onlyTestNetwork_Forward/ForwardLlamaRPCEndpointRateLimitResponseSinglefails, identically on 05126d0