Skip to content

Add optional cursor for run_at time on jobs#120

Open
BBrannick wants to merge 9 commits into
masterfrom
run-at-cursor
Open

Add optional cursor for run_at time on jobs#120
BBrannick wants to merge 9 commits into
masterfrom
run-at-cursor

Conversation

@BBrannick

Copy link
Copy Markdown
Contributor

This additional cursor can lead to more dead tuples/tombstones being skipped while acquiring locks on jobs. The cursor is optional, configured behind the run_at_cursor flag when starting a worker. If not specified the run_at clause will always be set to -infinity, performing the same as if it was not present.

BBrannick and others added 9 commits June 18, 2026 16:05
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_to_lock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused job_2 let binding in locker_spec.rb "with run_at_cursor enabled" context
- Update CLI description to clarify "due before" instead of "scheduled before"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…in/lock_job_query

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BBrannick BBrannick requested a review from a team June 22, 2026 14:09
@JoeSouthan

Copy link
Copy Markdown
Contributor

Do you have a query plan before and after for this?

@BBrannick

Copy link
Copy Markdown
Contributor Author

Do you have a query plan before and after for this?

I have query plans which include the index hinting we added, which shows lower index read execution when including the run_at cursor.
https://gist.github.com/BBrannick/4525e6a22a7708768cc46d4f559b122d

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