firebase / firebase/firebase-tools

Firestore emulator problem when 2 transactions in parallel are creating same document

Open
#6,758 2 comments 1 reaction 0 assignees View on GitHub
emulators: firestore type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:** 12.9.1

**Platform:** Windows 10

### [REQUIRED] Test case

When executing same transaction completely in parallel (2 executions going in parallel), if both transactions are creating a same document then neither transaction is going to succeed, both transactions fail.

_Error which both transactions receive_: **(StatusCode="Aborted", Detail="Transaction lock timeout.")**

### [REQUIRED] Steps to reproduce

Execute 2 transactions in parallel which are creating the same document in a same collection.

**Transaction configuration:** Only 1 attempt

### [REQUIRED] Expected behavior

At least one transaction to succeed.

### [REQUIRED] Actual behavior

Neither transaction succeed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.