Page MenuHomePhabricator

[lib] Set failedQueryCacheTimeout to 0 in UserIdentityCache
ClosedPublic

Authored by ashoat on Sep 11 2024, 3:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 4, 8:34 PM
Unknown Object (File)
Wed, Feb 26, 11:35 AM
Unknown Object (File)
Feb 15 2025, 9:30 PM
Unknown Object (File)
Feb 15 2025, 9:30 PM
Unknown Object (File)
Feb 15 2025, 9:29 PM
Unknown Object (File)
Feb 1 2025, 12:22 AM
Unknown Object (File)
Jan 15 2025, 6:17 AM
Unknown Object (File)
Jan 15 2025, 6:17 AM
Subscribers

Details

Summary

This addresses ENG-9255, and makes it so if a user identity fetch times out, the next time it's requested, we don't return null from the cache, but instead retry the fetch.

Test Plan

I set queryTimeout to 1 second, which made it time out. I confirmed in the logs that after the timeout, a second request was dispatched

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/useridentitycache
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/components/user-identity-cache.react.js
177

This change was necessary to differentiate a failed fetch from a timeout

205

The above change makes sure that we use failedQueryCacheTimeout in the case of a successful fetch that simply returns no information for a given UID. In that case, we consider the request successful, and the identity to not exist

This revision is now accepted and ready to land.Sep 12 2024, 3:54 AM