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

fix(subs): key collision on redis #865

Merged
merged 1 commit into from
Oct 4, 2024
Merged

fix(subs): key collision on redis #865

merged 1 commit into from
Oct 4, 2024

Conversation

michael-0acf4
Copy link
Contributor

Follow up of #863
When multiple start occurs for redis, some schedules can happen exactly at the same time resulting into the same identifier (and leading to an inconsistent state).

This solution simply combines the schedule with the run_id making it unique instead of using it as is.

mutation AllAtOnce {
  a: start_retry(kwargs: { .. }) # => calls add_schedule( ... date ...)
  b: start_retry(kwargs: { .. })
  c: start_retry(kwargs: { .. })
  d: start_retry(kwargs: { .. }) 
  e: start_retry(kwargs: { .. })
  f: start_retry(kwargs: { .. })
 # ..
}

Migration notes

None

  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

@michael-0acf4 michael-0acf4 changed the title fix(subs): key collision fix(subs): key collision on redis Oct 3, 2024
@michael-0acf4 michael-0acf4 merged commit daec029 into main Oct 4, 2024
11 of 12 checks passed
@michael-0acf4 michael-0acf4 deleted the patch-redis branch October 4, 2024 08:59
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.

2 participants