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

Drop vestigial thread safety support. #277

Merged
merged 2 commits into from Jul 12, 2019
Merged

Conversation

jamadden
Copy link
Member

RelStorage is IMVCCStorage, meaning each Connection has its own object, and Connections aren't thread safe.

This already only did anything on top-level instances anyway. There doesn't seem to be a good reason for that anymore.

There's one test from ZODB, BasicStorage.BasicStorage.check_checkCurrentSerialInTransaction which attempts to interleave operations on a storage from multiple threads. It's prepared to cope with some race conditions, though not all: it still depends on some implicit locking within the object. We workaround this by giving it what it wants.

This only did anything on top-level instances anyway. There doesn't seem to be a reason for that.

Two ZODB tests abuse threads and subject a storage to method calls
across threads. Use a wrapper for that.
Being this deterministic appears to completely solve the race conditions in BasicStorage.check_tid_w_ordering.
@jamadden jamadden merged commit 883a1f5 into master Jul 12, 2019
@jamadden jamadden deleted the storage-is-not-threadsafe branch July 12, 2019 13:04
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