You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single-flight credential fetch: slow-controller and expiry-margin edge cases #34
Failed fetches are not cached. With a hung or failing controller, the requests of a burst fetch one after another under the key's flight lock. Each request still fails after its own 20 s wait, but the detached fetches stay queued and drain at up to 15 s each.
The flight lock is held across refresh_oauth_if_needed, whose reqwest client (oidc.rs) has no timeout. Refreshes were already serialized by OAUTH_REFRESH_MUTEX before.
A credential issued with less than the 30 s expiry margin left is never cached, so each request waiting behind it fetches again (3 waiters, 3 fetches).
Expected
Share a failed result with the waiters of the same fetch (a short negative cache), bound the OAuth refresh client, and hand a just-fetched credential to the current waiters even when it is inside the margin.
Activity