Page MenuHomePhabricator

Merge LockManagerSqlChangeDispatchCoordinator into SqlChangeDispatchCoordinator, remove legacy locking
Open, Needs TriagePublic

Description

The LockManager version can also use MySQL as backend, so there's hardly a point in maintaining the old locking along the LockManager version.

There are two default LockManagers in MediaWiki:

$wgLockManagers[] = [
        'name' => 'fsLockManager',
        'class' => 'FSLockManager',
        'lockDirectory' => "{$wgUploadDirectory}/lockdir",
];
$wgLockManagers[] = [
        'name' => 'nullLockManager',
        'class' => 'NullLockManager',
];

I guess fsLockManager could be our new default.

Event Timeline

I agree with the task as described. However, I don't think file system locking should be the default. It assumes that all dispatchers run on the same system. There's no basis for that assumption. I would prefer database based locking to be the default.

The DBLockManager class does not seem to be what we are looking for, it's a bit misnamed. It should be called DBQuorumLockManager. The default we'd want would be very simple, and just use Database::lock.