-
Notifications
You must be signed in to change notification settings - Fork 948
Add retry logic around logic IndexedDB connections. #4047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Size Analysis ReportAffected Products
|
Type | Base (f9dc50e) | Head (669fa16) | Diff |
---|---|---|---|
size | 65.0 kB | 65.2 kB | +168 B (+0.3%) |
size_with_ext_deps | 76.3 kB | 76.5 kB | +168 B (+0.2%) |
Dependencies
Type | Base (f9dc50e) | Head (669fa16) | Diff |
---|---|---|---|
variables | Click to show 41 depsAUTH_ERROR_FACTORY BASE_POPUP_OPTIONS DB_DATA_KEYPATH DB_NAME DB_OBJECTSTORE_NAME DB_VERSION DEFAULT_API_TIMEOUT_MS DEFAULT_HEIGHT DEFAULT_WIDTH EMULATED_IFRAME_PATH EMULATOR_WIDGET_PATH ERRORS EVENT_DUPLICATION_CACHE_DURATION_MS FIREFOX_EMPTY_URL HTTP_REGEX IDP_REQUEST_URI IE10_LOCAL_STORAGE_SYNC_DELAY IFRAME_ATTRIBUTES IFRAME_PATH IP_ADDRESS_REGEX NETWORK_TIMEOUT NETWORK_TIMEOUT_DELAY PING_TIMEOUT SERVER_ERROR_MAP STORAGE_AVAILABLE_KEY TARGET_BLANK WEB_STORAGE_SUPPORT_KEY WIDGET_PATH _POLLING_INTERVAL_MS _POLLING_INTERVAL_MS$1 _POLL_WINDOW_CLOSE_TIMEOUT browserLocalPersistence browserPopupRedirectResolver browserSessionPersistence cachedGApiLoader inMemoryPersistence indexedDBLocalPersistence instanceCache logClient redirectOutcomeMap version |
Click to show 42 depsAUTH_ERROR_FACTORY BASE_POPUP_OPTIONS DB_DATA_KEYPATH DB_NAME DB_OBJECTSTORE_NAME DB_VERSION DEFAULT_API_TIMEOUT_MS DEFAULT_HEIGHT DEFAULT_WIDTH EMULATED_IFRAME_PATH EMULATOR_WIDGET_PATH ERRORS EVENT_DUPLICATION_CACHE_DURATION_MS FIREFOX_EMPTY_URL HTTP_REGEX IDP_REQUEST_URI IE10_LOCAL_STORAGE_SYNC_DELAY IFRAME_ATTRIBUTES IFRAME_PATH IP_ADDRESS_REGEX NETWORK_TIMEOUT NETWORK_TIMEOUT_DELAY PING_TIMEOUT SERVER_ERROR_MAP STORAGE_AVAILABLE_KEY TARGET_BLANK WEB_STORAGE_SUPPORT_KEY WIDGET_PATH _POLLING_INTERVAL_MS _POLLING_INTERVAL_MS$1 _POLL_WINDOW_CLOSE_TIMEOUT _TRANSACTION_RETRY_COUNT browserLocalPersistence browserPopupRedirectResolver browserSessionPersistence cachedGApiLoader inMemoryPersistence indexedDBLocalPersistence instanceCache logClient redirectOutcomeMap version |
+ _TRANSACTION_RETRY_COUNT |
indexedDBLocalPersistence
Size
Type | Base (f9dc50e) | Head (669fa16) | Diff |
---|---|---|---|
size | 45.1 kB | 45.3 kB | +168 B (+0.4%) |
size_with_ext_deps | 55.6 kB | 55.8 kB | +168 B (+0.3%) |
Dependencies
Type | Base (f9dc50e) | Head (669fa16) | Diff |
---|---|---|---|
variables | Click to show 19 depsAUTH_ERROR_FACTORY DB_DATA_KEYPATH DB_NAME DB_OBJECTSTORE_NAME DB_VERSION DEFAULT_API_TIMEOUT_MS ERRORS NETWORK_TIMEOUT NETWORK_TIMEOUT_DELAY PING_TIMEOUT SERVER_ERROR_MAP STORAGE_AVAILABLE_KEY _POLLING_INTERVAL_MS$1 _POLL_WINDOW_CLOSE_TIMEOUT inMemoryPersistence indexedDBLocalPersistence instanceCache logClient version |
Click to show 20 depsAUTH_ERROR_FACTORY DB_DATA_KEYPATH DB_NAME DB_OBJECTSTORE_NAME DB_VERSION DEFAULT_API_TIMEOUT_MS ERRORS NETWORK_TIMEOUT NETWORK_TIMEOUT_DELAY PING_TIMEOUT SERVER_ERROR_MAP STORAGE_AVAILABLE_KEY _POLLING_INTERVAL_MS$1 _POLL_WINDOW_CLOSE_TIMEOUT _TRANSACTION_RETRY_COUNT inMemoryPersistence indexedDBLocalPersistence instanceCache logClient version |
+ _TRANSACTION_RETRY_COUNT |
Test Logs
- Base (
f9dc50e3
): https://github.com/firebase/firebase-js-sdk/actions/runs/348565653 - Head (
669fa16c
): https://github.com/firebase/firebase-js-sdk/actions/runs/350050874
packages-exp/auth-exp/src/platform_browser/persistence/indexed_db.ts
Outdated
Show resolved
Hide resolved
this.db.close(); | ||
this.db = undefined; | ||
} | ||
// TODO: consider adding exponential backoff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding any sort of delay here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question for @schmidt-sebastian I think he mentioned they had this in Firestore but I couldn't find proof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We retry immediately at this scope, but at the higher level we retry with backoff: https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/util/async_queue.ts#L361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, will consider adding that in a followup if this doesn't fix it
Similar to https://github.com/firebase/firebase-js-sdk/blob/a10c18f8996fc35942779f5fea5690ae5d102bb0/packages/firestore/src/local/simple_db.ts