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

spanner: Session pool should hand out sessions in LIFO order #9392

Closed
skuruppu opened this issue Oct 4, 2019 · 1 comment
Closed

spanner: Session pool should hand out sessions in LIFO order #9392

skuruppu opened this issue Oct 4, 2019 · 1 comment
Assignees
Labels
api: spanner Issues related to the Spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@skuruppu
Copy link
Contributor

skuruppu commented Oct 4, 2019

Is your feature request related to a problem? Please describe.
Currently sessions are handed out from the session pool in FIFO order. Least recently used sessions are unlikely to be in backend caches, and the transactions associated with them are likely to aborted due to idleness.

Describe the solution you'd like
The session pool should hand out sessions in LIFO order.

@IlyaFaer IlyaFaer added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: spanner Issues related to the Spanner API. and removed api: storage Issues related to the Cloud Storage API. labels Oct 4, 2019
@tseaver tseaver self-assigned this Oct 4, 2019
@tseaver
Copy link
Contributor

tseaver commented Oct 4, 2019

For the FixedSizePoot and BurstyPool classes, this change is straightforward: we just use queue.LifoQueue instead of queue.Queue for the sessions.

For the PingingPool and TransacctionPingingPool class, the issue isn't quite clear: sessions are held in a priority queue based on when they need to be "pinged" (checked for existence at intervals).

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. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants