Tim Starling has submitted this change and it was merged. Change subject: [JobQueue] Reduced deadlocks in claim() function. ......................................................................
[JobQueue] Reduced deadlocks in claim() function. * Split claim() into claimRandom() and claimOldest(). * Added a new SELECT+UPDATE method that will automatically be used if there are slaves. This is what claimRandom() uses, which is the claim function used for random queues. This can handle torture testing with dozens of processes using NullJob without deadlocks. * Made claimOldest() work using the same method as the old claim() method. Doing SELECT first won't really work that well in this case. The useless "job_random > 0" is now gone from the query, which actually alleviates deadlock problems too. This method is used for "timestamp" ordered queues. Change-Id: Iaea96ff8eba2c918376f9465b54e9bbc3124f473 --- M includes/job/JobQueue.php M includes/job/JobQueueDB.php 2 files changed, 101 insertions(+), 51 deletions(-) Approvals: Tim Starling: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/31175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaea96ff8eba2c918376f9465b54e9bbc3124f473 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.21wmf3 Gerrit-Owner: Tim Starling <[email protected]> Gerrit-Reviewer: Aaron Schulz <[email protected]> Gerrit-Reviewer: Tim Starling <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
