Page MenuHomePhabricator

PoolCounter "slots" feature is global, not per-type
Closed, ResolvedPublic


The documentation on PoolCounter::$slots says that it limits the number of workers "working on this task type". But that's not true, it limits the number of workers globally, with all tasks with non-zero slots being lumped in together.

PoolCounter::hashKeyIntoSlots() returns an integer, it doesn't preserve the prefix which identifies the task type. The integer is then used as a global key. The client code does not add a task type prefix at any stage. With slots=1 I saw in my debug log:

Sending pool counter command: ACQ4ANY 0 1 1 1

But with no slots for the equivalent operation:

Sending pool counter command: ACQ4ANY mw:pcache:idhash:44-0!*!0!!en!5:revid:68 1 1 1

Event Timeline

tstarling created this task.May 2 2016, 3:11 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 2 2016, 3:11 AM

Change 286622 had a related patch set uploaded (by Aaron Schulz):
Include type in hashKeyIntoSlots()

Change 286622 merged by jenkins-bot:
Include type in hashKeyIntoSlots()

aaron closed this task as Resolved.May 10 2016, 12:24 AM