Conversation

olavloite

SpannerImpl would keep a reference to all database clients that had been created and then invalidated because the database was deleted or did not exists in the first place. If the getDatabaseClient(String) method would be called multiple times for the same invalid database, the memory usage of the application would continue to increase.

Fixes #1089

SpannerImpl would keep a reference to all database clients that had been
created and then invalidated because the database was deleted or did not
exists in the first place. If the getDatabaseClient(String) method would
be called multiple times for the same invalid database, the memory usage
of the application would continue to increase.

Fixes #1089
@olavloiteolavloite requested a review from a team as a code owner April 23, 2021 11:40
@product-auto-labelproduct-auto-label bot added the api: spannerIssues related to the googleapis/java-spanner API.label Apr 23, 2021
@google-clagoogle-cla bot added the cla: yesThis human has signed the Contributor License Agreement.label Apr 23, 2021
@codecov

Codecov Report

Merging #1093 (031b6d2) into master (71d7fd1) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1093      +/-   ##
============================================
- Coverage     85.15%   85.13%   -0.03%     
+ Complexity     2720     2717       -3     
============================================
  Files           155      155              
  Lines         14351    14349       -2     
  Branches       1358     1358              
============================================
- Hits          12221    12216       -5     
- Misses         1562     1566       +4     
+ Partials        568      567       -1     
Impacted FilesCoverage ΔComplexity Δ
...ain/java/com/google/cloud/spanner/SpannerImpl.java92.92% <100.00%> (-0.13%)29.00 <0.00> (ø)
...ud/spanner/SessionPoolAsyncTransactionManager.java85.03% <0.00%> (-1.58%)13.00% <0.00%> (-2.00%)
...ain/java/com/google/cloud/spanner/SessionPool.java89.01% <0.00%> (-0.20%)74.00% <0.00%> (-1.00%)
...a/com/google/cloud/spanner/SessionPoolOptions.java69.53% <0.00%> (ø)17.00% <0.00%> (-1.00%)
.../google/cloud/spanner/AbstractLazyInitializer.java100.00% <0.00%> (+7.14%)5.00% <0.00%> (+1.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 71d7fd1...031b6d2. Read the comment docs.

@thiagotnunesthiagotnunes added the kokoro:force-runAdd this label to force Kokoro to re-run the tests.label Apr 25, 2021
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests.label Apr 25, 2021
@thiagotnunesthiagotnunes merged commit b4595a6 into master Apr 25, 2021
@thiagotnunesthiagotnunes deleted the issue-1089 branch April 25, 2021 03:42
@sebright

Thanks for the fix!

Sign up for free to join this conversation on . Already have an account? Sign in to comment
api: spannerIssues related to the googleapis/java-spanner API.cla: yesThis human has signed the Contributor License Agreement.
None yet

Successfully merging this pull request may close these issues.

Reading from a non-existent database causes memory usage to grow