yamankatby / firebase-extensions

A collection of Firebase Extensions designed to help you build better apps faster.
Apache License 2.0
33 stars 1 forks source link

Handle more than 500 operations on firestore-connect ext batch write #75

Closed sinedie closed 6 months ago

sinedie commented 6 months ago

Right now if the src document changes, it updates all the target documents with a batch transaction.

What if I have more than 500 target documents?

A batched write can contain up to 500 operations.

From docs: https://firebase.google.com/docs/firestore/manage-data/transactions#batched-writes

sinedie commented 6 months ago

Docs says that but Firestore release notes says it is ok, so Im closing this

Firestore no longer limits the number of writes that can be passed to a Commit operation or performed in a transaction. Previously, the limit was 500. Limits for request size and the transaction time limit still apply.

https://cloud.google.com/firestore/docs/release-notes#March_29_2023