Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not keep references to invalidated clients #1093

Merged
merged 1 commit into from Apr 25, 2021
Merged

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Apr 23, 2021

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
@olavloite olavloite requested a review from thiagotnunes Apr 23, 2021
@olavloite olavloite requested a review from as a code owner Apr 23, 2021
@product-auto-label product-auto-label bot added the api: spanner label Apr 23, 2021
@google-cla google-cla bot added the cla: yes label Apr 23, 2021
@codecov
Copy link

@codecov codecov bot commented Apr 23, 2021

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 Files Coverage Δ Complexity Δ
...ain/java/com/google/cloud/spanner/SpannerImpl.java 92.92% <100.00%> (-0.13%) 29.00 <0.00> (ø)
...ud/spanner/SessionPoolAsyncTransactionManager.java 85.03% <0.00%> (-1.58%) 13.00% <0.00%> (-2.00%)
...ain/java/com/google/cloud/spanner/SessionPool.java 89.01% <0.00%> (-0.20%) 74.00% <0.00%> (-1.00%)
...a/com/google/cloud/spanner/SessionPoolOptions.java 69.53% <0.00%> (ø) 17.00% <0.00%> (-1.00%)
.../google/cloud/spanner/AbstractLazyInitializer.java 100.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.

@thiagotnunes thiagotnunes added the kokoro:force-run label Apr 25, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Apr 25, 2021
@thiagotnunes thiagotnunes merged commit b4595a6 into master Apr 25, 2021
16 of 17 checks passed
@thiagotnunes thiagotnunes deleted the issue-1089 branch Apr 25, 2021
@sebright
Copy link
Contributor

@sebright sebright commented Apr 25, 2021

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants