@google-cloud/spanner
Advanced tools
Comparing version 6.7.2 to 6.8.0
@@ -27,2 +27,3 @@ "use strict"; | ||
const google_gax_1 = require("google-gax"); | ||
const transaction_runner_1 = require("./transaction-runner"); | ||
const codec_1 = require("./codec"); | ||
@@ -333,3 +334,3 @@ const protos_1 = require("../protos/protos"); | ||
if (!(err.code && | ||
(retryableCodes.includes(err.code) || isRetryableInternalError(err))) || | ||
(retryableCodes.includes(err.code) || (0, transaction_runner_1.isRetryableInternalError)(err))) || | ||
// If we have received too many chunks without a resume token, it is not | ||
@@ -384,7 +385,2 @@ // safe to retry. | ||
} | ||
function isRetryableInternalError(err) { | ||
return (err.code === google_gax_1.grpc.status.INTERNAL && | ||
(err.message.includes('Received unexpected EOS on DATA frame from server') || | ||
err.message.includes('Received RST_STREAM'))); | ||
} | ||
//# sourceMappingURL=partial-result-stream.js.map |
@@ -179,1 +179,7 @@ /*! | ||
} | ||
/** | ||
* Checks whether the given error is a retryable internal error. | ||
* @param error the error to check | ||
* @return true if the error is a retryable internal error, and otherwise false. | ||
*/ | ||
export declare function isRetryableInternalError(err: grpc.ServiceError): boolean; |
@@ -18,3 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AsyncTransactionRunner = exports.TransactionRunner = exports.Runner = exports.DeadlineError = void 0; | ||
exports.isRetryableInternalError = exports.AsyncTransactionRunner = exports.TransactionRunner = exports.Runner = exports.DeadlineError = void 0; | ||
const promisify_1 = require("@google-cloud/promisify"); | ||
@@ -104,3 +104,5 @@ const google_gax_1 = require("google-gax"); | ||
shouldRetry(err) { | ||
return RETRYABLE.includes(err.code) || (0, session_pool_1.isSessionNotFoundError)(err); | ||
return (RETRYABLE.includes(err.code) || | ||
(0, session_pool_1.isSessionNotFoundError)(err) || | ||
isRetryableInternalError(err)); | ||
} | ||
@@ -155,3 +157,4 @@ /** | ||
// responsible for retrying the transaction on a different session. | ||
if (!RETRYABLE.includes(lastError.code)) { | ||
if (!RETRYABLE.includes(lastError.code) && | ||
!isRetryableInternalError(lastError)) { | ||
throw lastError; | ||
@@ -266,2 +269,15 @@ } | ||
exports.AsyncTransactionRunner = AsyncTransactionRunner; | ||
/** | ||
* Checks whether the given error is a retryable internal error. | ||
* @param error the error to check | ||
* @return true if the error is a retryable internal error, and otherwise false. | ||
*/ | ||
function isRetryableInternalError(err) { | ||
return (err.code === google_gax_1.grpc.status.INTERNAL && | ||
(err.message.includes('Received unexpected EOS on DATA frame from server') || | ||
err.message.includes('RST_STREAM') || | ||
err.message.includes('HTTP/2 error code: INTERNAL_ERROR') || | ||
err.message.includes('Connection closed with unknown cause'))); | ||
} | ||
exports.isRetryableInternalError = isRetryableInternalError; | ||
//# sourceMappingURL=transaction-runner.js.map |
@@ -1032,3 +1032,3 @@ "use strict"; | ||
else { | ||
this.begin().then(() => this.commit(options, callback)); | ||
this.begin().then(() => this.commit(options, callback), callback); | ||
return; | ||
@@ -1035,0 +1035,0 @@ } |
@@ -609,2 +609,8 @@ "use strict"; | ||
* Common options for this request. | ||
* @param {boolean} request.dataBoostEnabled | ||
* If this is for a partitioned query and this field is set to `true`, the | ||
* request will be executed via Spanner independent compute resources. | ||
* | ||
* If the field is set to `true` but the request does not set | ||
* `partition_token`, the API will return an `INVALID_ARGUMENT` error. | ||
* @param {object} [options] | ||
@@ -685,2 +691,8 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* Common options for this request. | ||
* @param {boolean} request.dataBoostEnabled | ||
* If this is for a partitioned read and this field is set to `true`, the | ||
* request will be executed via Spanner independent compute resources. | ||
* | ||
* If the field is set to `true` but the request does not set | ||
* `partition_token`, the API will return an `INVALID_ARGUMENT` error. | ||
* @param {object} [options] | ||
@@ -687,0 +699,0 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. |
{ | ||
"name": "@google-cloud/spanner", | ||
"description": "Cloud Spanner Client Library for Node.js", | ||
"version": "6.7.2", | ||
"version": "6.8.0", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6422738
107548