Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

fix: do not create sessions after getDatabases call#1228

Merged
olavloite merged 8 commits intogoogleapis:masterfrom
olavloite:issue-1227
Oct 2, 2020
Merged

fix: do not create sessions after getDatabases call#1228
olavloite merged 8 commits intogoogleapis:masterfrom
olavloite:issue-1227

Conversation

@olavloite
Copy link
Copy Markdown
Contributor

Calling instance.getDatabases() would return a list of Database instances. Each of these databases would be initialized with a default session pool containing a minimum of 25 sessions, potentially creating a lot of sessions unintentionally.

Fixes #1227

@olavloite olavloite requested review from a team August 28, 2020 13:37
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 28, 2020
@olavloite olavloite changed the title Issue 1227 fix: do not create sessions after getDatabases call Aug 28, 2020
@olavloite olavloite requested a review from skuruppu August 28, 2020 13:37
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 28, 2020

Codecov Report

Merging #1228 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1228   +/-   ##
=======================================
  Coverage   98.59%   98.59%           
=======================================
  Files          23       23           
  Lines       21426    21426           
  Branches     1251     1251           
=======================================
  Hits        21126    21126           
  Misses        297      297           
  Partials        3        3           
Impacted Files Coverage Δ
src/instance.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63b03cd...dea331a. Read the comment docs.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/nodejs-spanner API. label Aug 29, 2020
@olavloite
Copy link
Copy Markdown
Contributor Author

@stephenplusplus Friendly ping on this PR. Would you mind taking another look? Your request for change is currently blocking merging this.

@skuruppu
Copy link
Copy Markdown
Contributor

skuruppu commented Oct 1, 2020

@stephenplusplus friendly ping again. If you could take another look, that would be awesome.

@olavloite olavloite merged commit 53d5f37 into googleapis:master Oct 2, 2020
@olavloite olavloite deleted the issue-1227 branch October 2, 2020 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/nodejs-spanner API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListDatabases unintentionally initializes a session pool for each returned database

4 participants