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

Removing threadsafety as we already lock connections behind threads #897

Merged
merged 4 commits into from
Sep 1, 2022

Conversation

JackUrb
Copy link
Contributor

@JackUrb JackUrb commented Aug 31, 2022

Overview

Under rare circumstances, sqlite DB access was occurring across threads from where the table was originally created. Mephisto however wraps all DB access with conditions, so rather than having sqlite throw for us, we can actually safely process these requests.

Testing

We had a long running job that had issues before with an access across threads that killed the run. Now that job appears stable with no DB issues.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 31, 2022
Copy link
Contributor

@mojtaba-komeili mojtaba-komeili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2022

Codecov Report

Merging #897 (9dac9bc) into main (51a2b1d) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #897      +/-   ##
==========================================
- Coverage   64.63%   64.58%   -0.06%     
==========================================
  Files         108      108              
  Lines        9320     9320              
==========================================
- Hits         6024     6019       -5     
- Misses       3296     3301       +5     
Impacted Files Coverage Δ
mephisto/abstractions/databases/local_database.py 89.80% <100.00%> (ø)
...isto/abstractions/providers/mock/mock_datastore.py 53.92% <100.00%> (ø)
...to/abstractions/providers/mturk/mturk_datastore.py 61.48% <100.00%> (ø)
mephisto/abstractions/architects/mock_architect.py 88.23% <0.00%> (-2.62%) ⬇️
mephisto/data_model/unit.py 77.59% <0.00%> (-0.55%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@JackUrb JackUrb merged commit d8f5c3b into main Sep 1, 2022
@JackUrb JackUrb deleted the manually-thread-locked-db branch September 1, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants