Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Locking Firestore while batch writing

$
0
0

@obinnae wrote:

My Ionic 4 app calls a Google Cloud function (createTags(howmany)) that creates Firestore documents in batches - for instance, if you call createTags(50), it creates 50 documents using batch.set() & batch.commit().
I want it such that if user1 calls createTags(10000) and user2 calls createTag(5000), I want user2’s call to start after user1’s call completes.
How can I enforce that? Or does Firestore already lock the collection during a CRUD operation?

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>