Firestore: Fix FAILED_PRECONDITION when writing to a deleted document in a transaction by dconeybe · Pull Request #6550 · firebase/firebase-js-sdk (original) (raw)

NOTE: This PR introduced a bug: #6659 "transaction.get(ref) followed by transaction.set(ref, {...}) is causing the transaction to fail with error 'Document already exists' if the document was created by another app between the get and set."

The fix will be to consider ALREADY_EXISTS a retryable failure (currently, it is considered a permanent failure) so that the transaction will simply be retried.