Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add locks to process operations to prevent race conditions. #95

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

karajan1001
Copy link
Contributor

fix: #93

Our old solution on #53, can reduce possibility of race condition, but it still happens occasionally.

  1. Add locks to write and read operations to prevent this kind of error.
  2. Use reraise to simplify the code in __getitem__

@karajan1001 karajan1001 added the bug Something isn't working label Nov 8, 2022
@karajan1001 karajan1001 requested a review from pmrowla November 8, 2022 08:08
@karajan1001 karajan1001 self-assigned this Nov 8, 2022
fix: #93

Our old solution on #53, can reduce possibility of race condition, but
it still happens occasionally.

1. Add locks to write and read operations to prevent this kind of error.
2. Remove old file replacing solution.
3. Use reraise to simplify the code in `__getitem__`
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2022

Codecov Report

Base: 77.96% // Head: 77.81% // Decreases project coverage by -0.14% ⚠️

Coverage data is based on head (5d3c583) compared to base (22b25a4).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   77.96%   77.81%   -0.15%     
==========================================
  Files          21       21              
  Lines         912      915       +3     
  Branches      140      142       +2     
==========================================
+ Hits          711      712       +1     
+ Misses        178      176       -2     
- Partials       23       27       +4     
Impacted Files Coverage Δ
src/dvc_task/proc/manager.py 77.47% <100.00%> (+1.37%) ⬆️
src/dvc_task/proc/process.py 86.17% <100.00%> (+0.58%) ⬆️
src/dvc_task/worker/temporary.py 80.32% <0.00%> (-4.92%) ⬇️
tests/worker/test_temporary.py 93.93% <0.00%> (-3.04%) ⬇️
src/dvc_task/contrib/kombu_filesystem.py 39.28% <0.00%> (ø)

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pmrowla pmrowla merged commit 6e6dc47 into main Nov 8, 2022
@pmrowla pmrowla deleted the fix93 branch November 8, 2022 09:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission denied when reading msg on Windows.
3 participants