Homec4science

Make taskmaster consumption of failed tasks more FIFO-ey

Authored by epriestley <git@epriestley.com> on Dec 9 2013, 06:07.

Description

Make taskmaster consumption of failed tasks more FIFO-ey

Summary:
Ref T1049. See discussion in D7745. We have some specific interest in this for D7745, but generally we want to consume tasks with expired leases in roughly FIFO order, just like we consume new tasks in roughly FIFO order. Currently, when we select an expired task we order them by id, but this is the original insert order, not lease expiration order. Instead, order by leaseExpires.

This query is actually much better than the old one was, since the WHERE part is leaseExpries < VALUE.

Test Plan: Ran EXPLAIN on the query. Ran a taskmaster in debug mode and saw it lease new and expired tasks successfully.

Reviewers: hach-que, btrahan

Reviewed By: hach-que

CC: aran

Maniphest Tasks: T1049

Differential Revision: https://secure.phabricator.com/D7746

Details

Committed
epriestley <git@epriestley.com>Dec 9 2013, 06:07
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8fd256a1fd69: Implement step for publishing files as fragments to Phragment in Harbormaster
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH0ed281d25e44: Make taskmaster consumption of failed tasks more FIFO-ey (authored by epriestley <git@epriestley.com>).Dec 9 2013, 06:07