@google-cloud/spanner 6.14.0 → 6.15.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 CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
6
6
 
7
+ ## [6.15.0](https://github.com/googleapis/nodejs-spanner/compare/v6.14.0...v6.15.0) (2023-08-04)
8
+
9
+
10
+ ### Features
11
+
12
+ * Enable leader aware routing by default. This update contains performance optimisations that will reduce the latency of read/write transactions that originate from a region other than the default leader region. ([6852d99](https://github.com/googleapis/nodejs-spanner/commit/6852d99b858eb323ac3fc5e61905b8bf59486062))
13
+
7
14
  ## [6.14.0](https://github.com/googleapis/nodejs-spanner/compare/v6.13.0...v6.14.0) (2023-07-21)
8
15
 
9
16
 
@@ -48,8 +48,8 @@ export type GetInstanceConfigOperationsResponse = PagedResponse<IOperation, inst
48
48
  export type GetInstanceConfigOperationsCallback = PagedCallback<IOperation, instanceAdmin.spanner.admin.instance.v1.IListInstanceConfigOperationsResponse>;
49
49
  /**
50
50
  * Session pool configuration options.
51
- * @property {boolean} [routeToLeaderEnabled=False] If set to true leader aware routing will be enabled.
52
- * Enabling leader aware routing would route all requests in RW/PDML transactions to leader region.
51
+ * @property {boolean} [routeToLeaderEnabled=True] If set to false leader aware routing will be disabled.
52
+ * Disabling leader aware routing would route all requests in RW/PDML transactions to any region.
53
53
  */
54
54
  export interface SpannerOptions extends GrpcClientOptions {
55
55
  apiEndpoint?: string;
@@ -173,9 +173,9 @@ class Spanner extends service_1.GrpcService {
173
173
  packageJson: require('../../package.json'),
174
174
  };
175
175
  super(config, options);
176
- this.routeToLeaderEnabled = false;
177
- if (options.routeToLeaderEnabled === true) {
178
- this.routeToLeaderEnabled = true;
176
+ this.routeToLeaderEnabled = true;
177
+ if (options.routeToLeaderEnabled === false) {
178
+ this.routeToLeaderEnabled = false;
179
179
  }
180
180
  this.options = options;
181
181
  this.auth = new google_auth_library_1.GoogleAuth(this.options);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@google-cloud/spanner",
3
3
  "description": "Cloud Spanner Client Library for Node.js",
4
- "version": "6.14.0",
4
+ "version": "6.15.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc.",
7
7
  "engines": {