Page MenuHomePhabricator

Make taskmaster consumption of failed tasks more FIFO-ey
ClosedPublic

Authored by epriestley on Dec 9 2013, 4:04 AM.
Tags
None
Referenced Files
F18729508: D7746.diff
Tue, Sep 30, 11:15 AM
F18619671: D7746.diff
Mon, Sep 15, 3:05 AM
F18616787: D7746.id17514.diff
Sun, Sep 14, 7:01 PM
F18511430: D7746.id17514.diff
Fri, Sep 5, 6:36 AM
F18511031: D7746.diff
Fri, Sep 5, 6:01 AM
F18510866: D7746.diff
Fri, Sep 5, 5:51 AM
F18442785: D7746.id.diff
Aug 31 2025, 5:57 PM
F18416753: D7746.diff
Aug 30 2025, 11:01 AM
Subscribers

Details

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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley updated this revision to Unknown Object (????).Dec 9 2013, 4:16 AM
  • Add explicit test coverage. I was thinking this would be a pain to cover, but we actually have good infrastructure here already.