Skip to content

Convert watchStuckJobs implementation to use SCAN instead of KEYS#1174

Open
taywrobel wants to merge 1 commit intoAutomattic:masterfrom
taywrobel:feature/scanForStuckJobs
Open

Convert watchStuckJobs implementation to use SCAN instead of KEYS#1174
taywrobel wants to merge 1 commit intoAutomattic:masterfrom
taywrobel:feature/scanForStuckJobs

Conversation

@taywrobel
Copy link
Copy Markdown

@taywrobel taywrobel commented Apr 22, 2018

Adjusts the implementation of the watchStuckJobs LUA script to use
a paginated SCAN of the keyspace, rather than the current KEYS
approach.

This has a significant impact in large or shared redis deployments
where the keyspace can be unbounded in size. KEYS will block
all execution as it runs, which can take several seconds or longer
whereas the SCAN approach permits other operations to be run in
between each page of results.

Adjusts the implementation of the watchStubJobs LUA script to use
a paginated SCAN of the keyspace, rather than the current KEYS
approach.

This has a significant impact in large or shared redis deployments
where the keyspace can be unbounded in size.  KEYS will block
all execution as it runs, which can take several seconds or longer
whereas the SCAN approach permits other operations to be run in
between each page of results.
@vjustov
Copy link
Copy Markdown

vjustov commented Jul 3, 2018

👍 when could this be reviewd or merged?

@snypelife
Copy link
Copy Markdown

This is a pretty gnarly issue. Any chance this PR could get some traction?

@niclic
Copy link
Copy Markdown

niclic commented Oct 22, 2018

Last commit to master in January 2018? Don't hold your breath. @snypelife

@snypelife
Copy link
Copy Markdown

womp womp 👎

@rahulroy9202
Copy link
Copy Markdown

bump

@igauravsehrawat
Copy link
Copy Markdown

We had to cherry pick this code with modification to kue.prototype.watchStuckJobsMod

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.

6 participants