-
Notifications
You must be signed in to change notification settings - Fork 436
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
feat: Add support for batch session creation in Cloud Spanner #2342
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
@@ -643,31 +649,19 @@ private function getSession(array &$data) | |||
*/ | |||
private function createSessions($count) | |||
{ | |||
$args = [ | |||
$res = $this->database->connection()->batchCreateSessions([ |
There was a problem hiding this comment.
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([ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.