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] Switch collection cache's lock to async #905

Closed
pjenvey opened this issue Nov 5, 2020 · 0 comments · Fixed by #906
Closed

[spanner] Switch collection cache's lock to async #905

pjenvey opened this issue Nov 5, 2020 · 0 comments · Fixed by #906
Assignees
Labels
3 Estimate - m - This is a small change, but there's some uncertainty. enhancement New feature or request

Comments

@pjenvey
Copy link
Member

pjenvey commented Nov 5, 2020

The underlying thread safety of the CollectionCache is provided via a pair of std::sync::RwLocks which is not ideal now that we're async throughout the app.

The cache is generally only providing very cheap read calls, but w/ the /info/collections endpoint being a very common operation, let's switch it to tokio's async friendly RwLock in case a batch of writes blocks the executor (and or causes readers to block).

@pjenvey pjenvey added enhancement New feature or request 3 Estimate - m - This is a small change, but there's some uncertainty. labels Nov 5, 2020
@pjenvey pjenvey self-assigned this Nov 5, 2020
pjenvey added a commit that referenced this issue Nov 5, 2020
@fzzzy fzzzy closed this as completed in #906 Nov 6, 2020
fzzzy added a commit that referenced this issue Nov 6, 2020
* feat: switch coll cache's RwLock to async

Closes #905

* f remove the dev dep now that it's always a dep

Co-authored-by: JR Conlin <[email protected]>
Co-authored-by: Donovan Preston <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 Estimate - m - This is a small change, but there's some uncertainty. enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant