This repository was archived by the owner on May 8, 2026. It is now read-only.
Description OS: Linux
openjdk version 11.0.11
firebase-admin:7.3.0
google-cloud-firestore:2.5.0
A transaction with the local emulator that always throws an exception is constantly retried and never times out:
var options = FirestoreOptions
.getDefaultInstance ()
.toBuilder ()
.setProjectId (Config .GOOGLE_CLOUD_PROJECT )
.setEmulatorHost ("localhost:9000" )
.setCredentials (new FirestoreOptions .EmulatorCredentials ());
var firestore = options .build ().getService ();
firestore
.runAsyncTransaction (
tx -> {
log .info ("Hello world" );
throw new RuntimeException ("Fail" );
// return ApiFutures.immediateFuture("OK");
}
)
.get ();
If I replace the throw statement with return, the invocation finishes successfully.
I also tried adding the following, and it didn't work:
options .setRetrySettings (
RetrySettings
.newBuilder ()
.setMaxAttempts (1 )
.setTotalTimeout (Duration .ofSeconds (2 ))
.setInitialRpcTimeout (Duration .ofSeconds (2 ))
.setMaxRpcTimeout (Duration .ofSeconds (2 ))
.build ()
)
I expected the following:
Transaction retries to expire after 60 seconds
With the second example, the transaction to stop retrying after one failed attempt or 2 seconds passed.
Did I miss something?
Reactions are currently unavailable
OS: Linux
openjdk version 11.0.11
firebase-admin:7.3.0
google-cloud-firestore:2.5.0
A transaction with the local emulator that always throws an exception is constantly retried and never times out:
If I replace the
throwstatement withreturn, the invocation finishes successfully.I also tried adding the following, and it didn't work:
I expected the following:
Did I miss something?