Skip to content

Commit 1d62d46

Browse files
committed
Improve method comments for TransactionOptions.
1 parent bfe8641 commit 1d62d46

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ public Query collectionGroup(@NonNull String collectionId) {
407407
/**
408408
* Executes the given {@code updateFunction} and then attempts to commit the changes applied
409409
* within the transaction. If any document read within the transaction has changed, the
410-
* updateFunction will be retried. If it fails to commit after 5 attempts, the transaction will
411-
* fail.
410+
* updateFunction will be retried. If it fails to commit after 5 attempts (the default failure
411+
* limit), the transaction will fail.
412412
*
413413
* <p>The maximum number of writes allowed in a single transaction is 500, but note that each
414414
* usage of {@link FieldValue#serverTimestamp()}, {@link FieldValue#arrayUnion(Object...)}, {@link
@@ -441,8 +441,9 @@ private <ResultT> Task<ResultT> runTransaction(
441441
/**
442442
* Executes the given {@code updateFunction} and then attempts to commit the changes applied
443443
* within the transaction. If any document read within the transaction has changed, the
444-
* updateFunction will be retried. If it fails to commit after 5 attempts, the transaction will
445-
* fail.
444+
* updateFunction will be retried. If it fails to commit after 5 attempts (the default failure
445+
* limit), the transaction will fail. To have a different number of retries, use the {@link
446+
* FirebaseFirestore#runTransaction(TransactionOptions, Transaction.Function)} method instead.
446447
*
447448
* @param updateFunction The function to execute within the transaction context.
448449
* @return The task returned from the updateFunction.

0 commit comments

Comments
 (0)