Add fast-path message destination cache
Merged
RE
6mo ago+217+217+012345678901234567890123456789-81-81-01234567890123456789
Summary
- Adds a fast-path message destination cache for client/runtime message routing, caching resolved receivers on grain references/messages and reusing valid activation, connection, gateway, and hosted-client receivers.
- Invalidates stale cached receivers and falls back to normal addressing when connections, activations, or client gateway state are no longer valid.
- Avoids caching system target destinations so gateway/liveness changes are re-evaluated; keeps direct gateway connections normalized and updates client grain-to-silo mappings from responses.
Validation
git diff --check- conflict-marker scan
dotnet build src\Orleans.Core\Orleans.Core.csproj -mdotnet build src\Orleans.Runtime\Orleans.Runtime.csproj -m
Dependencies / notes
- This PR targets
main, but is logically related to the message-oriented networking work and may need review/merge coordination with that PR. - Additional coverage should exercise cache hit/miss, invalidation on disconnect/reconnect, stale receiver invalidation, gateway/loopback routing, system target routing, and retry behavior.