Skip to content

Commit

Permalink
Merge branch 'googleapis:main' into mux-read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
alkatrivedi authored Nov 11, 2024
2 parents 939d178 + 97ed577 commit a2c2fad
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions

## [7.16.0](https://github.com/googleapis/nodejs-spanner/compare/v7.15.0...v7.16.0) (2024-11-09)


### Features

* **spanner:** Add support for Cloud Spanner Default Backup Schedules ([#2135](https://github.com/googleapis/nodejs-spanner/issues/2135)) ([19f137c](https://github.com/googleapis/nodejs-spanner/commit/19f137c870796d60902be8d9d3a82f4abcfc693f))


### Bug Fixes

* **deps:** Update dependency google-gax to v4.4.1 ([#2100](https://github.com/googleapis/nodejs-spanner/issues/2100)) ([2e94bcd](https://github.com/googleapis/nodejs-spanner/commit/2e94bcd06d99a98c7767281e8035d000e186692b))

## [7.15.0](https://github.com/googleapis/nodejs-spanner/compare/v7.14.0...v7.15.0) (2024-10-30)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/spanner",
"description": "Cloud Spanner Client Library for Node.js",
"version": "7.15.0",
"version": "7.16.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"dependencies": {
"@google-cloud/kms": "^4.0.0",
"@google-cloud/precise-date": "^4.0.0",
"@google-cloud/spanner": "^7.15.0",
"@google-cloud/spanner": "^7.16.0",
"protobufjs": "^7.0.0",
"yargs": "^17.0.0"
},
"devDependencies": {
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.4.1",
"@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/instrumentation-grpc": "^0.53.0",
"@opentelemetry/instrumentation": "^0.54.0",
"@opentelemetry/instrumentation-grpc": "^0.54.0",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"chai": "^4.2.0",
Expand Down
14 changes: 3 additions & 11 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2233,11 +2233,6 @@ class Database extends common.GrpcServiceObject {
span.addEvent('Using Session', {'session.id': session?.id});
transaction!._observabilityOptions = this._observabilityOptions;
this._releaseOnEnd(session!, transaction!, span);
} else if (isSessionNotFoundError(err as grpc.ServiceError)) {
span.addEvent('No session available', {
'session.id': session?.id,
});
setSpanError(span, err);
} else {
setSpanError(span, err);
}
Expand Down Expand Up @@ -2515,11 +2510,7 @@ class Database extends common.GrpcServiceObject {
pool.getSession((err, session_) => {
const span = getActiveOrNoopSpan();
if (err) {
if (isSessionNotFoundError(err as grpc.ServiceError)) {
span.addEvent('No session available', {
'session.id': session?.id,
});
}
setSpanError(span, err as ServiceError);
destroyStream(err as ServiceError);
return;
}
Expand Down Expand Up @@ -3557,10 +3548,11 @@ class Database extends common.GrpcServiceObject {
this.pool_.release(session);
}
} catch (e) {
if (!isSessionNotFoundError(e as ServiceError)) {
if (isSessionNotFoundError(e as ServiceError)) {
span.addEvent('No session available', {
'session.id': sessionId,
});
} else {
span.end();
throw e;
}
Expand Down

0 comments on commit a2c2fad

Please sign in to comment.