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

Main worker should use zadd(xx=True) to update heartbeat #1550

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

selwin
Copy link
Collaborator

@selwin selwin commented Aug 25, 2021

No description provided.

@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #1550 (2429ac8) into master (b80045d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1550      +/-   ##
==========================================
- Coverage   95.54%   95.54%   -0.01%     
==========================================
  Files          46       46              
  Lines        6958     6957       -1     
==========================================
- Hits         6648     6647       -1     
  Misses        310      310              
Impacted Files Coverage Δ
rq/job.py 98.30% <100.00%> (ø)
rq/registry.py 97.19% <100.00%> (ø)
rq/worker.py 88.64% <100.00%> (ø)
tests/test_cli.py 98.89% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b80045d...2429ac8. Read the comment docs.

@aparcar
Copy link
Contributor

aparcar commented Aug 26, 2021

Why is this an advantage? And why is this option called xx rather than something like use_zadd?

@selwin
Copy link
Collaborator Author

selwin commented Aug 26, 2021

@aparcar zadd is always used. xx is actually an argument to zadd (I also don't like the option name but that's what Redis calls it). This PR resolves a hard to reproduce race conditions issues reported in #1507

I can maybe rename the option slightly to use_xx

@aparcar
Copy link
Contributor

aparcar commented Aug 26, 2021

Thanks for the insights, sorry for the noise

@selwin selwin merged commit c556106 into master Aug 26, 2021
@selwin selwin deleted the fix-race-condition branch August 26, 2021 12:16
raymondguo-db pushed a commit to raymondguo-db/rq that referenced this pull request Feb 18, 2022
raymondguo-db pushed a commit to raymondguo-db/rq that referenced this pull request Feb 18, 2022
rauchy added a commit to rauchy/rq that referenced this pull request Feb 21, 2022
Main worker should use zadd(xx=True) to update heartbeat. (rq#1550)
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

2 participants