diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java index bedac1352fd..a0bb668a0ec 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java @@ -263,6 +263,10 @@ public Query collectionGroup(@NonNull String collectionId) { * transaction. If any document read within the transaction has changed, the updateFunction will * be retried. If it fails to commit after 5 attempts, the transaction will fail. * + *

The maximum number of writes allowed in a single transaction batch is 500, but note that + * each usage of FieldValue.serverTimestamp(), FieldValue.arrayUnion(), FieldValue.arrayRemove(), + * or FieldValue.increment() inside a transaction counts as an additional write. + * * @param updateFunction The function to execute within the transaction context. * @param executor The executor to run the transaction callback on. * @return The task returned from the updateFunction. @@ -306,6 +310,10 @@ public Task runTransaction( /** * Creates a write batch, used for performing multiple writes as a single atomic operation. * + *

The maximum number of writes allowed in a single transaction batch is 500, but note that + * each usage of FieldValue.serverTimestamp(), FieldValue.arrayUnion(), FieldValue.arrayRemove(), + * or FieldValue.increment() inside a transaction counts as an additional write. + * * @return The created WriteBatch object. */ @NonNull