Skip to content

Commit

Permalink
Adding documentation for WriteBatch size limit (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Chen committed Apr 30, 2019
1 parent 9286a98 commit 4e40319
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -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.
*
* <p>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.
Expand Down Expand Up @@ -306,6 +310,10 @@ public <TResult> Task<TResult> runTransaction(
/**
* Creates a write batch, used for performing multiple writes as a single atomic operation.
*
* <p>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
Expand Down

0 comments on commit 4e40319

Please sign in to comment.