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

Implement automatic downsizing of session pool #646

Merged
merged 3 commits into from
Sep 18, 2017

Conversation

dwsupplee
Copy link
Contributor

Closes: #490

Please note, the circumvention of the GAPIC client is intended to be temporary until concurrent request support is built into the clients.

@dwsupplee dwsupplee added the api: spanner Issues related to the Spanner API. label Aug 23, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 23, 2017
public function deleteSessionAsync(array $args)
{
$database = $this->pluck('database', $args);
$headerDescriptor = new AgentHeaderDescriptor([

This comment was marked as spam.


/**
* {@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.

}

foreach ($calls as $call) {
$call->wait();

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -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.

// 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.

@dwsupplee dwsupplee added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 25, 2017
@jdpedrie jdpedrie mentioned this pull request Aug 25, 2017
@dwsupplee dwsupplee removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 18, 2017
@dwsupplee dwsupplee merged commit 7f73556 into googleapis:master Sep 18, 2017
@jdpedrie jdpedrie mentioned this pull request Oct 16, 2017
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.

4 participants