Skip to content

fix(subs): key collision on redis#865

Merged
michael-0acf4 merged 1 commit into
mainfrom
patch-redis
Oct 4, 2024
Merged

fix(subs): key collision on redis#865
michael-0acf4 merged 1 commit into
mainfrom
patch-redis

Conversation

@michael-0acf4
Copy link
Copy Markdown
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
@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