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(job-scheduler): add next delayed job only when prevMillis matches with producerId #3001

Merged
merged 3 commits into from
Jan 12, 2025

Conversation

roggervalf
Copy link
Collaborator

@roggervalf roggervalf commented Jan 9, 2025

Why

  1. Why is this change necessary? In order to only add delayed jobs while current producer matches with prevMillis

How

  1. How did you implement this? Do this validation when updating job scheduler, comparing prevMillis with producerId

Additional Notes (Optional)

Any extra info here.

schedulerAttributes[2] or "{}", delayedOpts, timestamp, jobSchedulerId, maxEvents, KEYS[1], nil, nil)

if ARGV[6] ~= "" then
rcall("HSET", ARGV[6], "nrjid", nextDelayedJobId)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we can even potentially deprecated this attribute with this new validation

@roggervalf roggervalf force-pushed the fix-check-current-producer branch from 1e52f79 to 1aabebd Compare January 11, 2025 00:31
Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

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

Looks good to me, other than I think producerKey could be a key instead of an arg.

ARGV[3] msgpacked delayed opts
ARGV[4] timestamp
ARGV[5] prefix key
ARGV[6] producer key
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use a key here instead of an arg?

@roggervalf roggervalf force-pushed the fix-check-current-producer branch from 4ff1399 to d327bb4 Compare January 12, 2025 16:35
@roggervalf roggervalf merged commit 4ea35dd into master Jan 12, 2025
8 of 9 checks passed
@roggervalf roggervalf deleted the fix-check-current-producer branch January 12, 2025 16:35
github-actions bot pushed a commit that referenced this pull request Jan 12, 2025
## [5.34.9](v5.34.8...v5.34.9) (2025-01-12)

### Bug Fixes

* **job-scheduler:** add next delayed job only when prevMillis matches with producerId ([#3001](#3001)) ([4ea35dd](4ea35dd))
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