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

feat: Add support for batch session creation in Cloud Spanner #2342

Merged
merged 7 commits into from
Oct 1, 2019
Merged

feat: Add support for batch session creation in Cloud Spanner #2342

merged 7 commits into from
Oct 1, 2019

Conversation

jdpedrie
Copy link
Contributor

No description provided.

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

codecov bot commented Sep 20, 2019

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2342      +/-   ##
============================================
+ Coverage     92.53%   92.54%   +0.01%     
- Complexity     4501     4502       +1     
============================================
  Files           312      312              
  Lines         13479    13488       +9     
============================================
+ Hits          12473    12483      +10     
+ Misses         1006     1005       -1
Impacted Files Coverage Δ Complexity Δ
Spanner/src/Session/CacheSessionPool.php 97.84% <100%> (+0.35%) 88 <0> (ø) ⬇️
Spanner/src/Connection/Grpc.php 94.35% <100%> (+0.11%) 95 <1> (+1) ⬆️

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 dfc7b37...f413a47. Read the comment docs.

@@ -643,31 +649,19 @@ private function getSession(array &$data)
*/
private function createSessions($count)
{
$args = [
$res = $this->database->connection()->batchCreateSessions([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be called in a while loop since it's possible for batchCreateSessions to return fewer than $count sessions.

@@ -643,31 +649,19 @@ private function getSession(array &$data)
*/
private function createSessions($count)
{
$args = [
$res = $this->database->connection()->batchCreateSessions([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, does the PHP client use more than one gRPC channel? If so, we want to distribute the sessions as evenly as possible across the channels. No problem if only one channel is used in this implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP only uses a single gRPC channel per request lifecycle.

@jdpedrie jdpedrie added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 30, 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.

5 participants