Skip to content

Commit

Permalink
fix: don't retry reads with Code ABORTED (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian authored Jan 14, 2020
1 parent 8f41b37 commit 82273ec
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
8 changes: 4 additions & 4 deletions dev/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -417,9 +417,6 @@
}
}
},
"LocationMetadata": {
"fields": {}
},
"IndexOperationMetadata": {
"fields": {
"startTime": {
Expand Down Expand Up @@ -601,6 +598,9 @@
"FAILED": 6,
"CANCELLED": 7
}
},
"LocationMetadata": {
"fields": {}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dev/src/v1/firestore_admin_proto_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
21 changes: 10 additions & 11 deletions dev/src/v1/firestore_client_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"deadline_exceeded_aborted_internal_unavailable": [
"deadline_exceeded_internal_unavailable": [
"DEADLINE_EXCEEDED",
"ABORTED",
"INTERNAL",
"UNAVAILABLE"
]
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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"
}
}
Expand Down
6 changes: 3 additions & 3 deletions dev/synth.metadata
Original file line number Diff line number Diff line change
@@ -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"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion dev/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 82273ec

Please sign in to comment.