-
Notifications
You must be signed in to change notification settings - Fork 928
Ignore IndexedDB failures during garbage collection #3015
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
Rationale is that they the LRU task will retry its run when it is invoked next. There are no tests since the GC scheduling code is not tested right now. Let me know if you would like me to add tests. Note that there is a behavior change: If the primary lease is lost, the GC run is rescheduled. It will however get stoped in https://github.com/firebase/firebase-js-sdk/blob/5a60243bf264967819fc5c3897892084c5eb4d43/packages/firestore/src/core/component_provider.ts#L203
313e0ac
to
ab16cf5
Compare
Binary Size ReportAffected SDKs
Test Logs |
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.
LGTM
await localStore.collectGarbage(this.garbageCollector); | ||
} catch (e) { | ||
if (e.name === 'IndexedDbTransactionError') { | ||
logDebug(LOG_TAG, 'Ignoring IndexedDB error during LRU: ', e); |
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.
"LRU" is not a great descriptor of what's going on here. How about "garbage collection"?
Also update the PR description.
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.
Done
Rationale is that they the LRU task will retry its run when it is invoked next.
There are no tests since the GC scheduling code is not tested right now. Let me know if you would like me to add tests.
Note that there is a behavior change: If the primary lease is lost, the GC run is rescheduled. It will however get stoped in
firebase-js-sdk/packages/firestore/src/core/component_provider.ts
Line 203 in 5a60243
Addresses #2755