From 82273ec0035b2ddae94d8f12791f8a5c55b6560d Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 14 Jan 2020 14:15:41 -0800 Subject: [PATCH] fix: don't retry reads with Code ABORTED (#881) --- dev/protos/protos.json | 8 ++++---- dev/src/v1/firestore_admin_proto_list.json | 4 ++-- dev/src/v1/firestore_client_config.json | 21 ++++++++++----------- dev/synth.metadata | 6 +++--- dev/test/index.ts | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/dev/protos/protos.json b/dev/protos/protos.json index 43a9cfaad..ea758f26b 100644 --- a/dev/protos/protos.json +++ b/dev/protos/protos.json @@ -11,7 +11,7 @@ "csharp_namespace": "Google.Cloud.Firestore.Admin.V1", "go_package": "google.golang.org/genproto/googleapis/firestore/admin/v1;admin", "java_multiple_files": true, - "java_outer_classname": "OperationProto", + "java_outer_classname": "LocationProto", "java_package": "com.google.firestore.admin.v1", "objc_class_prefix": "GCFS", "php_namespace": "Google\\Cloud\\Firestore\\Admin\\V1", @@ -417,9 +417,6 @@ } } }, - "LocationMetadata": { - "fields": {} - }, "IndexOperationMetadata": { "fields": { "startTime": { @@ -601,6 +598,9 @@ "FAILED": 6, "CANCELLED": 7 } + }, + "LocationMetadata": { + "fields": {} } } } diff --git a/dev/src/v1/firestore_admin_proto_list.json b/dev/src/v1/firestore_admin_proto_list.json index 0484301c3..f6060527c 100644 --- a/dev/src/v1/firestore_admin_proto_list.json +++ b/dev/src/v1/firestore_admin_proto_list.json @@ -2,6 +2,6 @@ "../../protos/google/firestore/admin/v1/index.proto", "../../protos/google/firestore/admin/v1/field.proto", "../../protos/google/firestore/admin/v1/firestore_admin.proto", - "../../protos/google/firestore/admin/v1/location.proto", - "../../protos/google/firestore/admin/v1/operation.proto" + "../../protos/google/firestore/admin/v1/operation.proto", + "../../protos/google/firestore/admin/v1/location.proto" ] diff --git a/dev/src/v1/firestore_client_config.json b/dev/src/v1/firestore_client_config.json index 60230c0d7..b1e32f327 100644 --- a/dev/src/v1/firestore_client_config.json +++ b/dev/src/v1/firestore_client_config.json @@ -7,9 +7,8 @@ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], - "deadline_exceeded_aborted_internal_unavailable": [ + "deadline_exceeded_internal_unavailable": [ "DEADLINE_EXCEEDED", - "ABORTED", "INTERNAL", "UNAVAILABLE" ] @@ -28,12 +27,12 @@ "methods": { "GetDocument": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "ListDocuments": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "CreateDocument": { @@ -48,17 +47,17 @@ }, "DeleteDocument": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "BatchGetDocuments": { "timeout_millis": 300000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "BeginTransaction": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "Commit": { @@ -68,12 +67,12 @@ }, "Rollback": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "RunQuery": { "timeout_millis": 300000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "Write": { @@ -83,12 +82,12 @@ }, "Listen": { "timeout_millis": 86400000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" }, "ListCollectionIds": { "timeout_millis": 60000, - "retry_codes_name": "deadline_exceeded_aborted_internal_unavailable", + "retry_codes_name": "deadline_exceeded_internal_unavailable", "retry_params_name": "default" } } diff --git a/dev/synth.metadata b/dev/synth.metadata index d20d3fb4f..6494e13f0 100644 --- a/dev/synth.metadata +++ b/dev/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2020-01-09T12:16:06.483557Z", + "updateTime": "2020-01-14T17:21:47.294128Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6ace586805c08896fef43e28a261337fcf3f022b", - "internalRef": "288783603" + "sha": "2fa8d48165cc48e35b0c62e6f7bdade12229326c", + "internalRef": "289619243" } }, { diff --git a/dev/test/index.ts b/dev/test/index.ts index 2e7343f17..26f6c0b37 100644 --- a/dev/test/index.ts +++ b/dev/test/index.ts @@ -1065,7 +1065,7 @@ describe('getAll() method', () => { [Status.PERMISSION_DENIED]: 1, [Status.RESOURCE_EXHAUSTED]: 1, [Status.FAILED_PRECONDITION]: 1, - [Status.ABORTED]: 5, + [Status.ABORTED]: 1, [Status.OUT_OF_RANGE]: 1, [Status.UNIMPLEMENTED]: 1, [Status.INTERNAL]: 5,