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

Lazily instantiate admin and operations clients #1852

Merged
merged 2 commits into from
Apr 29, 2019
Merged

Lazily instantiate admin and operations clients #1852

merged 2 commits into from
Apr 29, 2019

Conversation

jdpedrie
Copy link
Contributor

Fixes #1851 by only instantiating the Instance and Database admin clients when they are first used. The data client is still created upfront as it's the only one used in the course of the common usage.

@jdpedrie jdpedrie added the api: spanner Issues related to the Spanner API. label Apr 26, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 26, 2019
@codecov
Copy link

codecov bot commented Apr 26, 2019

Codecov Report

Merging #1852 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1852      +/-   ##
============================================
+ Coverage     91.58%   91.59%   +0.01%     
- Complexity     4408     4412       +4     
============================================
  Files           305      305              
  Lines         13103    13100       -3     
============================================
- Hits          12000    11999       -1     
+ Misses         1103     1101       -2
Impacted Files Coverage Δ Complexity Δ
Spanner/src/Connection/Grpc.php 94.18% <100%> (+0.42%) 93 <4> (+4) ⬆️

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 d2caa0d...06ce41c. Read the comment docs.

@dwsupplee dwsupplee merged commit 669ebdd into googleapis:master Apr 29, 2019
@jdpedrie jdpedrie deleted the spanner-lazy-load-clients branch April 29, 2019 15:57
@jdpedrie jdpedrie mentioned this pull request May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the 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.

[Spanner] GrpcTransport is created five times per request
3 participants