Page MenuHomePhabricator

JobQueueGroup's singletons using the wrong wgJobTypeConf
Closed, InvalidPublic

Description

JobQueueGroup::singleton allows one to get the JobQueue group of any wiki. Most commonly, this is used to enqueue jobs for other wikis with JobQueueGroup::singleton( $another_wiki )->push( $job ). However, when selecting the queue onto which to push the job, JobQueueGroup's code [accesses $wgJobTypeConf directly](https://github.com/wikimedia/mediawiki/blob/dd3125c3b1adbf80845d195f772d7506f14e9470/includes/jobqueue/JobQueueGroup.php#L104-L119), which means that it is using the setting of the current wiki, instead of the wiki selected with JobQueueGroup::singleton( $wiki ). This creates problems in cases where a job type is using one queue for one wiki and a different one for another. This is a common pattern during the JobQueue transport migration to EventBus where we switch jobs selectively wiki-by-wiki or group-by-group, such as T193254: Global renames get stuck at metawiki.

Event Timeline

mobrovac created this task.

Change 430097 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Select proper wgJobTypeConf for the JobQueue target wikis.

https://gerrit.wikimedia.org/r/430097

Change 430097 abandoned by Ppchelko:
Select proper wgJobTypeConf for the JobQueue target wikis.

Reason:
Heh, ok, seems like we have to reinvent or job transferring strategy..

https://gerrit.wikimedia.org/r/430097

Pchelolo added subscribers: aaron, Pchelolo.

Per @aaron

Yes, wgJobTypeConf is intended to be set the same on all wikis to avoid having to shell/API out.

So seems like it's not a bug in MW, but us mistreating the configuration parameter for gradual jobs rollouts.

Couldn't we just include wgJobTypeConf in the list of settings that can be retrieved for any wiki from SiteConfig?

Vvjjkkii renamed this task from JobQueueGroup's singletons using the wrong wgJobTypeConf to 4wdaaaaaaa.Jul 1 2018, 1:12 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
1997kB renamed this task from 4wdaaaaaaa to JobQueueGroup's singletons using the wrong wgJobTypeConf.Jul 1 2018, 2:47 AM
1997kB closed this task as Invalid.
1997kB updated the task description. (Show Details)
1997kB added subscribers: gerritbot, Aklapper.