-
Notifications
You must be signed in to change notification settings - Fork 438
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
Implement automatic downsizing of session pool #646
Conversation
src/Spanner/Connection/Grpc.php
Outdated
public function deleteSessionAsync(array $args) | ||
{ | ||
$database = $this->pluck('database', $args); | ||
$headerDescriptor = new AgentHeaderDescriptor([ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/Spanner/V1/SpannerClient.php
Outdated
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
class SpannerClient extends SpannerGapicClient | ||
{ | ||
// This class is intentionally empty, and is intended to hold manual additions to the generated {@see SpannerClientImpl} class. | ||
/** | ||
* Returns the underyling stub. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
} | ||
|
||
foreach ($calls as $call) { | ||
$call->wait(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -257,6 +268,11 @@ public function acquire($context = SessionPoolInterface::CONTEXT_READ) | |||
$session = $this->waitForNextAvailableSession(); | |||
} | |||
|
|||
if ($this->deleteQueue) { | |||
$this->deleteSessions($this->deleteQueue); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// gRPC calls appear to cancel when the corresponding UnaryCall object | ||
// goes out of scope. Keeping the calls in scope allows time for the | ||
// calls to complete at the expense of a small memory footprint. | ||
$this->deleteCalls = []; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
efc8c99
to
c68d5bf
Compare
Closes: #490
Please note, the circumvention of the GAPIC client is intended to be temporary until concurrent request support is built into the clients.