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

Improve the way store connections are managed #452

Merged
merged 1 commit into from Apr 12, 2021

Conversation

jamadden
Copy link
Member

This makes it much less likely a "stale" store connection that hasn't
actually been checked for liveness gets used. (Long story short, there
could be one more connection than RelStorage instance because of how
these were managed, and that connection would be rarely used, only
when the ZODB connection pool is overgrown. Closing or timing out ZODB
connections wouldn't actually remove that one.)

With psycopg2, restarting a store connection sometimes/often doesn't
have to actually communicate with the database if we know we're not in
a transaction. This could make a OperationalError pop up at an unusual
time.

This doesn't change that, but it does fix it so that resolving the
underlying issue doesn't leave a time bomb waiting.

Gardening changes

==> Downloading https://homebrew.bintray.com/bottles/ccache-4.2.1.catalina.bottle.tar.gz
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource ccache
Download failed: https://homebrew.bintray.com/bottles/ccache-4.2.1.catalina.bottle.tar.gz
Error: Process completed with exit code 1.

  • Fix linting errors found by updated pylint/astroid.

This makes it much less likely a "stale" store connection that hasn't
actually been checked for liveness gets used. (Long story short, there
could be one more connection than RelStorage instance because of how
these were managed, and that connection would be rarely used, only
when the ZODB connection pool is overgrown. Closing or timing out ZODB
connections wouldn't actually remove that one.)

With psycopg2, restarting a store connection sometimes/often doesn't
have to actually communicate with the database if we know we're not in
a transaction. This could make a OperationalError pop up at an unusual
time.

This doesn't change that, but it does fix it so that resolving the
underlying issue doesn't leave a time bomb waiting.

Run brew update before installing.

Getting an error installing ccache, thinking maybe the old version is gone now?
==> Downloading https://homebrew.bintray.com/bottles/ccache-4.2.1.catalina.bottle.tar.gz
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource ccache
Download failed: https://homebrew.bintray.com/bottles/ccache-4.2.1.catalina.bottle.tar.gz
Error: Process completed with exit code 1.
https://github.com/zodb/relstorage/runs/2326416136?check_suite_focus=true

Fix linting errors found by updated pylint/astroid.
@jamadden jamadden merged commit 5e6ef78 into master Apr 12, 2021
@jamadden jamadden deleted the better_store_conn_cleanup branch April 12, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant