Right now dispatching basically works like this:
- Find a suitable wiki to dispatch to (select one from the top n stalest wikis which doesn't have chd_lock set)
- Lock it (via a MySQL lock or by using a LockManager instance)
- Update chd_lock and chd_touched in the wb_changes_dispatch table for the wiki just selected.
- Dispatch the changes
- Remove the lock
- Update wb_changes_dispatch again (chd_lock, chd_touched and chd_seen).
I propose removing step 3, effectively relying more on the lock done via LockManager.
In order to not get to many collisions when selecting wikis for dispatching, we should bump the randomness used for dispatching ("Number of least current target wikis to pick from at random.") at least in Wikimedia production.