From 9b170a4f3beb16f7dab513520a07be48fcb88670 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 15 Jun 2020 12:00:19 -0700 Subject: [PATCH] feat: retry CommitRequests that fail with UNAVAILABLE PiperOrigin-RevId: 316514901 --- .../firestore/v1/firestore_grpc_service_config.json | 11 ++++++++++- google/firestore/v1/query.proto | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/google/firestore/v1/firestore_grpc_service_config.json b/google/firestore/v1/firestore_grpc_service_config.json index 0c6f86d9..ee7cdecc 100755 --- a/google/firestore/v1/firestore_grpc_service_config.json +++ b/google/firestore/v1/firestore_grpc_service_config.json @@ -15,7 +15,16 @@ "method": "Commit" } ], - "timeout": "60s" + "timeout": "60s", + "retryPolicy": { + "maxAttempts": 5, + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE" + ] + } }, { "name": [ diff --git a/google/firestore/v1/query.proto b/google/firestore/v1/query.proto index 333d29e8..557fbad1 100644 --- a/google/firestore/v1/query.proto +++ b/google/firestore/v1/query.proto @@ -170,11 +170,6 @@ message StructuredQuery { } } - // A reference to a field, such as `max(messages.time) as max_time`. - message FieldReference { - string field_path = 2; - } - // An order on a field. message Order { // The field to order by. @@ -184,6 +179,11 @@ message StructuredQuery { Direction direction = 2; } + // A reference to a field, such as `max(messages.time) as max_time`. + message FieldReference { + string field_path = 2; + } + // The projection of document's fields to return. message Projection { // The fields to return.