Page MenuHomePhabricator

[lib] Set failedQueryCacheTimeout to 0 in UserIdentityCache
ClosedPublic

Authored by ashoat on Wed, Sep 11, 3:38 PM.
Tags
None
Referenced Files
F2763941: D13299.id44064.diff
Thu, Sep 19, 12:09 PM
F2762019: D13299.id44089.diff
Thu, Sep 19, 8:57 AM
F2756738: D13299.id44063.diff
Thu, Sep 19, 1:17 AM
F2753920: D13299.diff
Wed, Sep 18, 6:25 PM
Unknown Object (File)
Wed, Sep 18, 5:37 AM
Unknown Object (File)
Wed, Sep 18, 3:43 AM
Unknown Object (File)
Wed, Sep 18, 1:12 AM
Unknown Object (File)
Sun, Sep 15, 1:04 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/components/user-identity-cache.react.js
177 ↗(On Diff #44062)

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

205 ↗(On Diff #44062)

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.Thu, Sep 12, 3:54 AM