@google-cloud/spanner 6.7.2 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +1 -1
- package/build/protos/google/spanner/admin/database/v1/common.proto +1 -1
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +1 -1
- package/build/protos/google/spanner/admin/instance/v1/common.proto +1 -1
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +1 -1
- package/build/protos/google/spanner/v1/commit_response.proto +1 -1
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +1 -1
- package/build/protos/google/spanner/v1/spanner.proto +15 -1
- package/build/protos/google/spanner/v1/transaction.proto +1 -1
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +12 -0
- package/build/protos/protos.js +46 -0
- package/build/protos/protos.json +11 -3
- package/build/src/partial-result-stream.js +2 -6
- package/build/src/transaction-runner.d.ts +6 -0
- package/build/src/transaction-runner.js +19 -3
- package/build/src/transaction.js +1 -1
- package/build/src/v1/spanner_client.d.ts +24 -0
- package/build/src/v1/spanner_client.js +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [6.8.0](https://github.com/googleapis/nodejs-spanner/compare/v6.7.2...v6.8.0) (2023-04-06)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Adding new fields for Serverless analytics ([#1816](https://github.com/googleapis/nodejs-spanner/issues/1816)) ([2a6ca6f](https://github.com/googleapis/nodejs-spanner/commit/2a6ca6f09215752f9451d625ac02837e9d70b66a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Begin transaction foes not handle error ([#1833](https://github.com/googleapis/nodejs-spanner/issues/1833)) ([6ecd366](https://github.com/googleapis/nodejs-spanner/commit/6ecd366da7183d502c710cb5c879984c276b12db))
|
|
18
|
+
* Correcting the proto field Id for field data_boost_enabled ([#1827](https://github.com/googleapis/nodejs-spanner/issues/1827)) ([7f6d4cc](https://github.com/googleapis/nodejs-spanner/commit/7f6d4ccce9269197312f2d795ef854e1789e8fce))
|
|
19
|
+
* Logic for retrying specifiied internal errors ([#1822](https://github.com/googleapis/nodejs-spanner/issues/1822)) ([f915bd1](https://github.com/googleapis/nodejs-spanner/commit/f915bd16cf7e817243e46a319b3e6f270b24bf68)), closes [#1808](https://github.com/googleapis/nodejs-spanner/issues/1808)
|
|
20
|
+
|
|
7
21
|
## [6.7.2](https://github.com/googleapis/nodejs-spanner/compare/v6.7.1...v6.7.2) (2023-02-17)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -24,7 +24,7 @@ import "google/protobuf/timestamp.proto";
|
|
|
24
24
|
import "google/spanner/admin/database/v1/common.proto";
|
|
25
25
|
|
|
26
26
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
|
|
27
|
-
option go_package = "google.
|
|
27
|
+
option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb";
|
|
28
28
|
option java_multiple_files = true;
|
|
29
29
|
option java_outer_classname = "BackupProto";
|
|
30
30
|
option java_package = "com.google.spanner.admin.database.v1";
|
|
@@ -22,7 +22,7 @@ import "google/protobuf/timestamp.proto";
|
|
|
22
22
|
import "google/rpc/status.proto";
|
|
23
23
|
|
|
24
24
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
|
|
25
|
-
option go_package = "google.
|
|
25
|
+
option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb";
|
|
26
26
|
option java_multiple_files = true;
|
|
27
27
|
option java_outer_classname = "CommonProto";
|
|
28
28
|
option java_package = "com.google.spanner.admin.database.v1";
|
|
@@ -29,7 +29,7 @@ import "google/spanner/admin/database/v1/backup.proto";
|
|
|
29
29
|
import "google/spanner/admin/database/v1/common.proto";
|
|
30
30
|
|
|
31
31
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
|
|
32
|
-
option go_package = "google.
|
|
32
|
+
option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb";
|
|
33
33
|
option java_multiple_files = true;
|
|
34
34
|
option java_outer_classname = "SpannerDatabaseAdminProto";
|
|
35
35
|
option java_package = "com.google.spanner.admin.database.v1";
|
|
@@ -19,7 +19,7 @@ package google.spanner.admin.instance.v1;
|
|
|
19
19
|
import "google/protobuf/timestamp.proto";
|
|
20
20
|
|
|
21
21
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
|
|
22
|
-
option go_package = "google.
|
|
22
|
+
option go_package = "cloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "CommonProto";
|
|
25
25
|
option java_package = "com.google.spanner.admin.instance.v1";
|
|
@@ -29,7 +29,7 @@ import "google/protobuf/timestamp.proto";
|
|
|
29
29
|
import "google/spanner/admin/instance/v1/common.proto";
|
|
30
30
|
|
|
31
31
|
option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
|
|
32
|
-
option go_package = "google.
|
|
32
|
+
option go_package = "cloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb";
|
|
33
33
|
option java_multiple_files = true;
|
|
34
34
|
option java_outer_classname = "SpannerInstanceAdminProto";
|
|
35
35
|
option java_package = "com.google.spanner.admin.instance.v1";
|
|
@@ -19,7 +19,7 @@ package google.spanner.v1;
|
|
|
19
19
|
import "google/protobuf/timestamp.proto";
|
|
20
20
|
|
|
21
21
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
22
|
-
option go_package = "google.
|
|
22
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "CommitResponseProto";
|
|
25
25
|
option java_package = "com.google.spanner.v1";
|
|
@@ -19,7 +19,7 @@ package google.spanner.v1;
|
|
|
19
19
|
import "google/protobuf/struct.proto";
|
|
20
20
|
|
|
21
21
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
22
|
-
option go_package = "google.
|
|
22
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "KeysProto";
|
|
25
25
|
option java_package = "com.google.spanner.v1";
|
|
@@ -21,7 +21,7 @@ import "google/protobuf/struct.proto";
|
|
|
21
21
|
import "google/spanner/v1/keys.proto";
|
|
22
22
|
|
|
23
23
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
24
|
-
option go_package = "google.
|
|
24
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
25
25
|
option java_multiple_files = true;
|
|
26
26
|
option java_outer_classname = "MutationProto";
|
|
27
27
|
option java_package = "com.google.spanner.v1";
|
|
@@ -19,7 +19,7 @@ package google.spanner.v1;
|
|
|
19
19
|
import "google/protobuf/struct.proto";
|
|
20
20
|
|
|
21
21
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
22
|
-
option go_package = "google.
|
|
22
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "QueryPlanProto";
|
|
25
25
|
option java_package = "com.google.spanner.v1";
|
|
@@ -23,7 +23,7 @@ import "google/spanner/v1/type.proto";
|
|
|
23
23
|
|
|
24
24
|
option cc_enable_arenas = true;
|
|
25
25
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
26
|
-
option go_package = "google.
|
|
26
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
27
27
|
option java_multiple_files = true;
|
|
28
28
|
option java_outer_classname = "ResultSetProto";
|
|
29
29
|
option java_package = "com.google.spanner.v1";
|
|
@@ -32,7 +32,7 @@ import "google/spanner/v1/transaction.proto";
|
|
|
32
32
|
import "google/spanner/v1/type.proto";
|
|
33
33
|
|
|
34
34
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
35
|
-
option go_package = "google.
|
|
35
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
36
36
|
option java_multiple_files = true;
|
|
37
37
|
option java_outer_classname = "SpannerProto";
|
|
38
38
|
option java_package = "com.google.spanner.v1";
|
|
@@ -643,6 +643,13 @@ message ExecuteSqlRequest {
|
|
|
643
643
|
|
|
644
644
|
// Common options for this request.
|
|
645
645
|
RequestOptions request_options = 11;
|
|
646
|
+
|
|
647
|
+
// If this is for a partitioned query and this field is set to `true`, the
|
|
648
|
+
// request will be executed via Spanner independent compute resources.
|
|
649
|
+
//
|
|
650
|
+
// If the field is set to `true` but the request does not set
|
|
651
|
+
// `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
652
|
+
bool data_boost_enabled = 16;
|
|
646
653
|
}
|
|
647
654
|
|
|
648
655
|
// The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml].
|
|
@@ -949,6 +956,13 @@ message ReadRequest {
|
|
|
949
956
|
|
|
950
957
|
// Common options for this request.
|
|
951
958
|
RequestOptions request_options = 11;
|
|
959
|
+
|
|
960
|
+
// If this is for a partitioned read and this field is set to `true`, the
|
|
961
|
+
// request will be executed via Spanner independent compute resources.
|
|
962
|
+
//
|
|
963
|
+
// If the field is set to `true` but the request does not set
|
|
964
|
+
// `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
965
|
+
bool data_boost_enabled = 15;
|
|
952
966
|
}
|
|
953
967
|
|
|
954
968
|
// The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
|
|
@@ -20,7 +20,7 @@ import "google/protobuf/duration.proto";
|
|
|
20
20
|
import "google/protobuf/timestamp.proto";
|
|
21
21
|
|
|
22
22
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
23
|
-
option go_package = "google.
|
|
23
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
24
24
|
option java_multiple_files = true;
|
|
25
25
|
option java_outer_classname = "TransactionProto";
|
|
26
26
|
option java_package = "com.google.spanner.v1";
|
|
@@ -19,7 +19,7 @@ package google.spanner.v1;
|
|
|
19
19
|
import "google/api/field_behavior.proto";
|
|
20
20
|
|
|
21
21
|
option csharp_namespace = "Google.Cloud.Spanner.V1";
|
|
22
|
-
option go_package = "google.
|
|
22
|
+
option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
|
|
23
23
|
option java_multiple_files = true;
|
|
24
24
|
option java_outer_classname = "TypeProto";
|
|
25
25
|
option java_package = "com.google.spanner.v1";
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -17451,6 +17451,9 @@ export namespace google {
|
|
|
17451
17451
|
|
|
17452
17452
|
/** ExecuteSqlRequest requestOptions */
|
|
17453
17453
|
requestOptions?: (google.spanner.v1.IRequestOptions|null);
|
|
17454
|
+
|
|
17455
|
+
/** ExecuteSqlRequest dataBoostEnabled */
|
|
17456
|
+
dataBoostEnabled?: (boolean|null);
|
|
17454
17457
|
}
|
|
17455
17458
|
|
|
17456
17459
|
/** Represents an ExecuteSqlRequest. */
|
|
@@ -17495,6 +17498,9 @@ export namespace google {
|
|
|
17495
17498
|
/** ExecuteSqlRequest requestOptions. */
|
|
17496
17499
|
public requestOptions?: (google.spanner.v1.IRequestOptions|null);
|
|
17497
17500
|
|
|
17501
|
+
/** ExecuteSqlRequest dataBoostEnabled. */
|
|
17502
|
+
public dataBoostEnabled: boolean;
|
|
17503
|
+
|
|
17498
17504
|
/**
|
|
17499
17505
|
* Creates a new ExecuteSqlRequest instance using the specified properties.
|
|
17500
17506
|
* @param [properties] Properties to set
|
|
@@ -18617,6 +18623,9 @@ export namespace google {
|
|
|
18617
18623
|
|
|
18618
18624
|
/** ReadRequest requestOptions */
|
|
18619
18625
|
requestOptions?: (google.spanner.v1.IRequestOptions|null);
|
|
18626
|
+
|
|
18627
|
+
/** ReadRequest dataBoostEnabled */
|
|
18628
|
+
dataBoostEnabled?: (boolean|null);
|
|
18620
18629
|
}
|
|
18621
18630
|
|
|
18622
18631
|
/** Represents a ReadRequest. */
|
|
@@ -18658,6 +18667,9 @@ export namespace google {
|
|
|
18658
18667
|
/** ReadRequest requestOptions. */
|
|
18659
18668
|
public requestOptions?: (google.spanner.v1.IRequestOptions|null);
|
|
18660
18669
|
|
|
18670
|
+
/** ReadRequest dataBoostEnabled. */
|
|
18671
|
+
public dataBoostEnabled: boolean;
|
|
18672
|
+
|
|
18661
18673
|
/**
|
|
18662
18674
|
* Creates a new ReadRequest instance using the specified properties.
|
|
18663
18675
|
* @param [properties] Properties to set
|
package/build/protos/protos.js
CHANGED
|
@@ -43169,6 +43169,7 @@
|
|
|
43169
43169
|
* @property {number|Long|null} [seqno] ExecuteSqlRequest seqno
|
|
43170
43170
|
* @property {google.spanner.v1.ExecuteSqlRequest.IQueryOptions|null} [queryOptions] ExecuteSqlRequest queryOptions
|
|
43171
43171
|
* @property {google.spanner.v1.IRequestOptions|null} [requestOptions] ExecuteSqlRequest requestOptions
|
|
43172
|
+
* @property {boolean|null} [dataBoostEnabled] ExecuteSqlRequest dataBoostEnabled
|
|
43172
43173
|
*/
|
|
43173
43174
|
|
|
43174
43175
|
/**
|
|
@@ -43275,6 +43276,14 @@
|
|
|
43275
43276
|
*/
|
|
43276
43277
|
ExecuteSqlRequest.prototype.requestOptions = null;
|
|
43277
43278
|
|
|
43279
|
+
/**
|
|
43280
|
+
* ExecuteSqlRequest dataBoostEnabled.
|
|
43281
|
+
* @member {boolean} dataBoostEnabled
|
|
43282
|
+
* @memberof google.spanner.v1.ExecuteSqlRequest
|
|
43283
|
+
* @instance
|
|
43284
|
+
*/
|
|
43285
|
+
ExecuteSqlRequest.prototype.dataBoostEnabled = false;
|
|
43286
|
+
|
|
43278
43287
|
/**
|
|
43279
43288
|
* Creates a new ExecuteSqlRequest instance using the specified properties.
|
|
43280
43289
|
* @function create
|
|
@@ -43324,6 +43333,8 @@
|
|
|
43324
43333
|
$root.google.spanner.v1.ExecuteSqlRequest.QueryOptions.encode(message.queryOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
43325
43334
|
if (message.requestOptions != null && Object.hasOwnProperty.call(message, "requestOptions"))
|
|
43326
43335
|
$root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
43336
|
+
if (message.dataBoostEnabled != null && Object.hasOwnProperty.call(message, "dataBoostEnabled"))
|
|
43337
|
+
writer.uint32(/* id 16, wireType 0 =*/128).bool(message.dataBoostEnabled);
|
|
43327
43338
|
return writer;
|
|
43328
43339
|
};
|
|
43329
43340
|
|
|
@@ -43421,6 +43432,10 @@
|
|
|
43421
43432
|
message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32());
|
|
43422
43433
|
break;
|
|
43423
43434
|
}
|
|
43435
|
+
case 16: {
|
|
43436
|
+
message.dataBoostEnabled = reader.bool();
|
|
43437
|
+
break;
|
|
43438
|
+
}
|
|
43424
43439
|
default:
|
|
43425
43440
|
reader.skipType(tag & 7);
|
|
43426
43441
|
break;
|
|
@@ -43510,6 +43525,9 @@
|
|
|
43510
43525
|
if (error)
|
|
43511
43526
|
return "requestOptions." + error;
|
|
43512
43527
|
}
|
|
43528
|
+
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
43529
|
+
if (typeof message.dataBoostEnabled !== "boolean")
|
|
43530
|
+
return "dataBoostEnabled: boolean expected";
|
|
43513
43531
|
return null;
|
|
43514
43532
|
};
|
|
43515
43533
|
|
|
@@ -43598,6 +43616,8 @@
|
|
|
43598
43616
|
throw TypeError(".google.spanner.v1.ExecuteSqlRequest.requestOptions: object expected");
|
|
43599
43617
|
message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions);
|
|
43600
43618
|
}
|
|
43619
|
+
if (object.dataBoostEnabled != null)
|
|
43620
|
+
message.dataBoostEnabled = Boolean(object.dataBoostEnabled);
|
|
43601
43621
|
return message;
|
|
43602
43622
|
};
|
|
43603
43623
|
|
|
@@ -43643,6 +43663,7 @@
|
|
|
43643
43663
|
object.seqno = options.longs === String ? "0" : 0;
|
|
43644
43664
|
object.queryOptions = null;
|
|
43645
43665
|
object.requestOptions = null;
|
|
43666
|
+
object.dataBoostEnabled = false;
|
|
43646
43667
|
}
|
|
43647
43668
|
if (message.session != null && message.hasOwnProperty("session"))
|
|
43648
43669
|
object.session = message.session;
|
|
@@ -43673,6 +43694,8 @@
|
|
|
43673
43694
|
object.queryOptions = $root.google.spanner.v1.ExecuteSqlRequest.QueryOptions.toObject(message.queryOptions, options);
|
|
43674
43695
|
if (message.requestOptions != null && message.hasOwnProperty("requestOptions"))
|
|
43675
43696
|
object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options);
|
|
43697
|
+
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
43698
|
+
object.dataBoostEnabled = message.dataBoostEnabled;
|
|
43676
43699
|
return object;
|
|
43677
43700
|
};
|
|
43678
43701
|
|
|
@@ -46328,6 +46351,7 @@
|
|
|
46328
46351
|
* @property {Uint8Array|null} [resumeToken] ReadRequest resumeToken
|
|
46329
46352
|
* @property {Uint8Array|null} [partitionToken] ReadRequest partitionToken
|
|
46330
46353
|
* @property {google.spanner.v1.IRequestOptions|null} [requestOptions] ReadRequest requestOptions
|
|
46354
|
+
* @property {boolean|null} [dataBoostEnabled] ReadRequest dataBoostEnabled
|
|
46331
46355
|
*/
|
|
46332
46356
|
|
|
46333
46357
|
/**
|
|
@@ -46426,6 +46450,14 @@
|
|
|
46426
46450
|
*/
|
|
46427
46451
|
ReadRequest.prototype.requestOptions = null;
|
|
46428
46452
|
|
|
46453
|
+
/**
|
|
46454
|
+
* ReadRequest dataBoostEnabled.
|
|
46455
|
+
* @member {boolean} dataBoostEnabled
|
|
46456
|
+
* @memberof google.spanner.v1.ReadRequest
|
|
46457
|
+
* @instance
|
|
46458
|
+
*/
|
|
46459
|
+
ReadRequest.prototype.dataBoostEnabled = false;
|
|
46460
|
+
|
|
46429
46461
|
/**
|
|
46430
46462
|
* Creates a new ReadRequest instance using the specified properties.
|
|
46431
46463
|
* @function create
|
|
@@ -46471,6 +46503,8 @@
|
|
|
46471
46503
|
writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.partitionToken);
|
|
46472
46504
|
if (message.requestOptions != null && Object.hasOwnProperty.call(message, "requestOptions"))
|
|
46473
46505
|
$root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
|
46506
|
+
if (message.dataBoostEnabled != null && Object.hasOwnProperty.call(message, "dataBoostEnabled"))
|
|
46507
|
+
writer.uint32(/* id 15, wireType 0 =*/120).bool(message.dataBoostEnabled);
|
|
46474
46508
|
return writer;
|
|
46475
46509
|
};
|
|
46476
46510
|
|
|
@@ -46547,6 +46581,10 @@
|
|
|
46547
46581
|
message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32());
|
|
46548
46582
|
break;
|
|
46549
46583
|
}
|
|
46584
|
+
case 15: {
|
|
46585
|
+
message.dataBoostEnabled = reader.bool();
|
|
46586
|
+
break;
|
|
46587
|
+
}
|
|
46550
46588
|
default:
|
|
46551
46589
|
reader.skipType(tag & 7);
|
|
46552
46590
|
break;
|
|
@@ -46622,6 +46660,9 @@
|
|
|
46622
46660
|
if (error)
|
|
46623
46661
|
return "requestOptions." + error;
|
|
46624
46662
|
}
|
|
46663
|
+
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
46664
|
+
if (typeof message.dataBoostEnabled !== "boolean")
|
|
46665
|
+
return "dataBoostEnabled: boolean expected";
|
|
46625
46666
|
return null;
|
|
46626
46667
|
};
|
|
46627
46668
|
|
|
@@ -46684,6 +46725,8 @@
|
|
|
46684
46725
|
throw TypeError(".google.spanner.v1.ReadRequest.requestOptions: object expected");
|
|
46685
46726
|
message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions);
|
|
46686
46727
|
}
|
|
46728
|
+
if (object.dataBoostEnabled != null)
|
|
46729
|
+
message.dataBoostEnabled = Boolean(object.dataBoostEnabled);
|
|
46687
46730
|
return message;
|
|
46688
46731
|
};
|
|
46689
46732
|
|
|
@@ -46728,6 +46771,7 @@
|
|
|
46728
46771
|
object.partitionToken = $util.newBuffer(object.partitionToken);
|
|
46729
46772
|
}
|
|
46730
46773
|
object.requestOptions = null;
|
|
46774
|
+
object.dataBoostEnabled = false;
|
|
46731
46775
|
}
|
|
46732
46776
|
if (message.session != null && message.hasOwnProperty("session"))
|
|
46733
46777
|
object.session = message.session;
|
|
@@ -46755,6 +46799,8 @@
|
|
|
46755
46799
|
object.partitionToken = options.bytes === String ? $util.base64.encode(message.partitionToken, 0, message.partitionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.partitionToken) : message.partitionToken;
|
|
46756
46800
|
if (message.requestOptions != null && message.hasOwnProperty("requestOptions"))
|
|
46757
46801
|
object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options);
|
|
46802
|
+
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
46803
|
+
object.dataBoostEnabled = message.dataBoostEnabled;
|
|
46758
46804
|
return object;
|
|
46759
46805
|
};
|
|
46760
46806
|
|
package/build/protos/protos.json
CHANGED
|
@@ -1312,7 +1312,7 @@
|
|
|
1312
1312
|
"v1": {
|
|
1313
1313
|
"options": {
|
|
1314
1314
|
"csharp_namespace": "Google.Cloud.Spanner.Admin.Database.V1",
|
|
1315
|
-
"go_package": "google.
|
|
1315
|
+
"go_package": "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb",
|
|
1316
1316
|
"java_multiple_files": true,
|
|
1317
1317
|
"java_outer_classname": "SpannerDatabaseAdminProto",
|
|
1318
1318
|
"java_package": "com.google.spanner.admin.database.v1",
|
|
@@ -2762,7 +2762,7 @@
|
|
|
2762
2762
|
"v1": {
|
|
2763
2763
|
"options": {
|
|
2764
2764
|
"csharp_namespace": "Google.Cloud.Spanner.Admin.Instance.V1",
|
|
2765
|
-
"go_package": "google.
|
|
2765
|
+
"go_package": "cloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb",
|
|
2766
2766
|
"java_multiple_files": true,
|
|
2767
2767
|
"java_outer_classname": "SpannerInstanceAdminProto",
|
|
2768
2768
|
"java_package": "com.google.spanner.admin.instance.v1",
|
|
@@ -3627,7 +3627,7 @@
|
|
|
3627
3627
|
"v1": {
|
|
3628
3628
|
"options": {
|
|
3629
3629
|
"csharp_namespace": "Google.Cloud.Spanner.V1",
|
|
3630
|
-
"go_package": "google.
|
|
3630
|
+
"go_package": "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb",
|
|
3631
3631
|
"java_multiple_files": true,
|
|
3632
3632
|
"java_outer_classname": "SpannerProto",
|
|
3633
3633
|
"java_package": "com.google.spanner.v1",
|
|
@@ -4654,6 +4654,10 @@
|
|
|
4654
4654
|
"requestOptions": {
|
|
4655
4655
|
"type": "RequestOptions",
|
|
4656
4656
|
"id": 11
|
|
4657
|
+
},
|
|
4658
|
+
"dataBoostEnabled": {
|
|
4659
|
+
"type": "bool",
|
|
4660
|
+
"id": 16
|
|
4657
4661
|
}
|
|
4658
4662
|
},
|
|
4659
4663
|
"nested": {
|
|
@@ -4918,6 +4922,10 @@
|
|
|
4918
4922
|
"requestOptions": {
|
|
4919
4923
|
"type": "RequestOptions",
|
|
4920
4924
|
"id": 11
|
|
4925
|
+
},
|
|
4926
|
+
"dataBoostEnabled": {
|
|
4927
|
+
"type": "bool",
|
|
4928
|
+
"id": 15
|
|
4921
4929
|
}
|
|
4922
4930
|
}
|
|
4923
4931
|
},
|
|
@@ -24,6 +24,7 @@ const mergeStream = require("merge-stream");
|
|
|
24
24
|
const stream_1 = require("stream");
|
|
25
25
|
const streamEvents = require("stream-events");
|
|
26
26
|
const google_gax_1 = require("google-gax");
|
|
27
|
+
const transaction_runner_1 = require("./transaction-runner");
|
|
27
28
|
const codec_1 = require("./codec");
|
|
28
29
|
const protos_1 = require("../protos/protos");
|
|
29
30
|
const stream = require("stream");
|
|
@@ -329,7 +330,7 @@ function partialResultStream(requestFn, options) {
|
|
|
329
330
|
};
|
|
330
331
|
const retry = (err) => {
|
|
331
332
|
if (!(err.code &&
|
|
332
|
-
(retryableCodes.includes(err.code) || isRetryableInternalError(err))) ||
|
|
333
|
+
(retryableCodes.includes(err.code) || (0, transaction_runner_1.isRetryableInternalError)(err))) ||
|
|
333
334
|
// If we have received too many chunks without a resume token, it is not
|
|
334
335
|
// safe to retry.
|
|
335
336
|
withoutCheckpointCount > maxQueued) {
|
|
@@ -379,9 +380,4 @@ exports.partialResultStream = partialResultStream;
|
|
|
379
380
|
function _hasResumeToken(chunk) {
|
|
380
381
|
return is.defined(chunk.resumeToken) && chunk.resumeToken.length > 0;
|
|
381
382
|
}
|
|
382
|
-
function isRetryableInternalError(err) {
|
|
383
|
-
return (err.code === google_gax_1.grpc.status.INTERNAL &&
|
|
384
|
-
(err.message.includes('Received unexpected EOS on DATA frame from server') ||
|
|
385
|
-
err.message.includes('Received RST_STREAM')));
|
|
386
|
-
}
|
|
387
383
|
//# sourceMappingURL=partial-result-stream.js.map
|
|
@@ -176,3 +176,9 @@ export declare class AsyncTransactionRunner<T> extends Runner<T> {
|
|
|
176
176
|
*/
|
|
177
177
|
protected _run(transaction: Transaction): Promise<T>;
|
|
178
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Checks whether the given error is a retryable internal error.
|
|
181
|
+
* @param error the error to check
|
|
182
|
+
* @return true if the error is a retryable internal error, and otherwise false.
|
|
183
|
+
*/
|
|
184
|
+
export declare function isRetryableInternalError(err: grpc.ServiceError): boolean;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AsyncTransactionRunner = exports.TransactionRunner = exports.Runner = exports.DeadlineError = void 0;
|
|
18
|
+
exports.isRetryableInternalError = exports.AsyncTransactionRunner = exports.TransactionRunner = exports.Runner = exports.DeadlineError = void 0;
|
|
19
19
|
const promisify_1 = require("@google-cloud/promisify");
|
|
20
20
|
const google_gax_1 = require("google-gax");
|
|
21
21
|
const protobufjs_1 = require("protobufjs");
|
|
@@ -100,7 +100,9 @@ class Runner {
|
|
|
100
100
|
}
|
|
101
101
|
/** Returns whether the given error should cause a transaction retry. */
|
|
102
102
|
shouldRetry(err) {
|
|
103
|
-
return RETRYABLE.includes(err.code) ||
|
|
103
|
+
return (RETRYABLE.includes(err.code) ||
|
|
104
|
+
(0, session_pool_1.isSessionNotFoundError)(err) ||
|
|
105
|
+
isRetryableInternalError(err));
|
|
104
106
|
}
|
|
105
107
|
/**
|
|
106
108
|
* Retrieves a transaction to run against.
|
|
@@ -150,7 +152,8 @@ class Runner {
|
|
|
150
152
|
// Note that if the error is a 'Session not found' error, it will be
|
|
151
153
|
// thrown here. We do this to bubble this error up to the caller who is
|
|
152
154
|
// responsible for retrying the transaction on a different session.
|
|
153
|
-
if (!RETRYABLE.includes(lastError.code)
|
|
155
|
+
if (!RETRYABLE.includes(lastError.code) &&
|
|
156
|
+
!isRetryableInternalError(lastError)) {
|
|
154
157
|
throw lastError;
|
|
155
158
|
}
|
|
156
159
|
this.attempts += 1;
|
|
@@ -260,4 +263,17 @@ class AsyncTransactionRunner extends Runner {
|
|
|
260
263
|
}
|
|
261
264
|
}
|
|
262
265
|
exports.AsyncTransactionRunner = AsyncTransactionRunner;
|
|
266
|
+
/**
|
|
267
|
+
* Checks whether the given error is a retryable internal error.
|
|
268
|
+
* @param error the error to check
|
|
269
|
+
* @return true if the error is a retryable internal error, and otherwise false.
|
|
270
|
+
*/
|
|
271
|
+
function isRetryableInternalError(err) {
|
|
272
|
+
return (err.code === google_gax_1.grpc.status.INTERNAL &&
|
|
273
|
+
(err.message.includes('Received unexpected EOS on DATA frame from server') ||
|
|
274
|
+
err.message.includes('RST_STREAM') ||
|
|
275
|
+
err.message.includes('HTTP/2 error code: INTERNAL_ERROR') ||
|
|
276
|
+
err.message.includes('Connection closed with unknown cause')));
|
|
277
|
+
}
|
|
278
|
+
exports.isRetryableInternalError = isRetryableInternalError;
|
|
263
279
|
//# sourceMappingURL=transaction-runner.js.map
|
package/build/src/transaction.js
CHANGED
|
@@ -1029,7 +1029,7 @@ class Transaction extends Dml {
|
|
|
1029
1029
|
reqOpts.singleUseTransaction = this._options;
|
|
1030
1030
|
}
|
|
1031
1031
|
else {
|
|
1032
|
-
this.begin().then(() => this.commit(options, callback));
|
|
1032
|
+
this.begin().then(() => this.commit(options, callback), callback);
|
|
1033
1033
|
return;
|
|
1034
1034
|
}
|
|
1035
1035
|
if ('returnCommitStats' in options &&
|
|
@@ -317,6 +317,12 @@ export declare class SpannerClient {
|
|
|
317
317
|
* Query optimizer configuration to use for the given query.
|
|
318
318
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
319
319
|
* Common options for this request.
|
|
320
|
+
* @param {boolean} request.dataBoostEnabled
|
|
321
|
+
* If this is for a partitioned query and this field is set to `true`, the
|
|
322
|
+
* request will be executed via Spanner independent compute resources.
|
|
323
|
+
*
|
|
324
|
+
* If the field is set to `true` but the request does not set
|
|
325
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
320
326
|
* @param {object} [options]
|
|
321
327
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
322
328
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -450,6 +456,12 @@ export declare class SpannerClient {
|
|
|
450
456
|
* PartitionReadRequest message used to create this partition_token.
|
|
451
457
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
452
458
|
* Common options for this request.
|
|
459
|
+
* @param {boolean} request.dataBoostEnabled
|
|
460
|
+
* If this is for a partitioned read and this field is set to `true`, the
|
|
461
|
+
* request will be executed via Spanner independent compute resources.
|
|
462
|
+
*
|
|
463
|
+
* If the field is set to `true` but the request does not set
|
|
464
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
453
465
|
* @param {object} [options]
|
|
454
466
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
455
467
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -790,6 +802,12 @@ export declare class SpannerClient {
|
|
|
790
802
|
* Query optimizer configuration to use for the given query.
|
|
791
803
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
792
804
|
* Common options for this request.
|
|
805
|
+
* @param {boolean} request.dataBoostEnabled
|
|
806
|
+
* If this is for a partitioned query and this field is set to `true`, the
|
|
807
|
+
* request will be executed via Spanner independent compute resources.
|
|
808
|
+
*
|
|
809
|
+
* If the field is set to `true` but the request does not set
|
|
810
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
793
811
|
* @param {object} [options]
|
|
794
812
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
795
813
|
* @returns {Stream}
|
|
@@ -853,6 +871,12 @@ export declare class SpannerClient {
|
|
|
853
871
|
* PartitionReadRequest message used to create this partition_token.
|
|
854
872
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
855
873
|
* Common options for this request.
|
|
874
|
+
* @param {boolean} request.dataBoostEnabled
|
|
875
|
+
* If this is for a partitioned read and this field is set to `true`, the
|
|
876
|
+
* request will be executed via Spanner independent compute resources.
|
|
877
|
+
*
|
|
878
|
+
* If the field is set to `true` but the request does not set
|
|
879
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
856
880
|
* @param {object} [options]
|
|
857
881
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
858
882
|
* @returns {Stream}
|
|
@@ -606,6 +606,12 @@ class SpannerClient {
|
|
|
606
606
|
* Query optimizer configuration to use for the given query.
|
|
607
607
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
608
608
|
* Common options for this request.
|
|
609
|
+
* @param {boolean} request.dataBoostEnabled
|
|
610
|
+
* If this is for a partitioned query and this field is set to `true`, the
|
|
611
|
+
* request will be executed via Spanner independent compute resources.
|
|
612
|
+
*
|
|
613
|
+
* If the field is set to `true` but the request does not set
|
|
614
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
609
615
|
* @param {object} [options]
|
|
610
616
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
611
617
|
* @returns {Stream}
|
|
@@ -681,6 +687,12 @@ class SpannerClient {
|
|
|
681
687
|
* PartitionReadRequest message used to create this partition_token.
|
|
682
688
|
* @param {google.spanner.v1.RequestOptions} request.requestOptions
|
|
683
689
|
* Common options for this request.
|
|
690
|
+
* @param {boolean} request.dataBoostEnabled
|
|
691
|
+
* If this is for a partitioned read and this field is set to `true`, the
|
|
692
|
+
* request will be executed via Spanner independent compute resources.
|
|
693
|
+
*
|
|
694
|
+
* If the field is set to `true` but the request does not set
|
|
695
|
+
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
|
|
684
696
|
* @param {object} [options]
|
|
685
697
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
686
698
|
* @returns {Stream}
|