fix(firestore,android): abort timed-out transactions without crashing on a later get - #18668
Conversation
… on a later get Returning a failed result from the native update callback lets the Android SDK commit, so a subsequent transaction.get hits ensureCommitNotCalled and kills the process. Throw instead so Dart still sees deadline-exceeded.
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Description
Android
runTransactiontimed out by returning a failed result from the native update callback. The Firestore SDK treated that as success, committed, and a latertransaction.gethitensureCommitNotCalled.AssertionErroris not anException, so the process died instead of Dart seeingdeadline-exceeded.Abort the callback with a non-retryable error (still mapped to
deadline-exceeded) and catchThrowableintransactionGet.Related Issues
Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change