Commit graph

39 commits

Author SHA1 Message Date
Aaron Schulz
dd359741cc Move DB errors to Rdbms namespace
Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
2017-04-15 10:47:41 -07:00
Aaron Schulz
3c2a172c3f Move DBConnRef/MaintainableDBConnRef to Rdbms namespace
Change-Id: I7ca6b40f973b2aae83747de92e280ded222c87e3
2017-03-29 11:04:47 -07:00
Aaron Schulz
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07:00
James D. Forrester
9635dda73a includes: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
2017-02-21 18:13:24 +00:00
jenkins-bot
69ae945e8d Merge "Update weblinks in comments from HTTP to HTTPS" 2016-11-08 21:32:00 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Aaron Schulz
1eb86e0e4d Rename JobQueueDB::getSlaveDB() to getReplicaDB()
Change-Id: I7a88c4876e76836c92cc0b45b4e72124a087121c
2016-10-29 00:04:39 -07:00
Kunal Mehta
61adc1e146 Use namespaced ScopedCallback
The un-namespaced \ScopedCallback is deprecated.

Change-Id: Ie014d5a775ead66335a24acac9d339915884d1a4
2016-10-17 15:46:05 -07:00
Aaron Schulz
a2790b1b80 Remove wfGetCaller() dependency from DatabaseBase
Change-Id: I3e240b2eb5c1f6a21f1bc974c3d28f5755c7451a
2016-09-15 14:40:00 -07:00
Aaron Schulz
fca4beb302 Avoid using deprecated methods in JobQueueDB
Change-Id: Ib35b8792e3e4902b52c3e708d8c6e756f35986bd
2016-09-12 19:56:37 -07:00
Aaron Schulz
950cf6016c Rename DB_SLAVE constant to DB_REPLICA
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.

The old constant is an alias now.

Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
2016-09-05 22:55:53 -07:00
Aaron Schulz
16266edff3 Change "slave" => "replica DB" in /includes
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
2016-09-05 21:01:01 +00:00
Aaron Schulz
f3cfdf0baa Remove commit() calls from JobQueueDB
These are not safe for the common case where the local DB
handle is used for the queue (and other table writes).

Change-Id: Ic24a05c18bf31e49bf7e9a3c058deb5d35271511
2016-08-23 17:24:58 +00:00
Aaron Schulz
1f313389e2 Remove direct rollback() calls from some places
Rely on the mass-rollback logic in MWExceptionHandler instead.
This results in a better chance of atomicity.

Change-Id: I2eb5661d4acc105a1323d69c5463268c234bd745
2016-08-23 01:19:21 +00:00
Aaron Schulz
b5d8f3aed1 Fix some JobQueue IDEA errors
Change-Id: I624f65ee1ca97c1acae9b54ca36d910eb4e42a70
2016-03-08 03:23:13 -08:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Ricordisamoa
7a97368c35 Stop doing $that = $this in includes/jobqueue
Closures support $this as of PHP 5.4

Change-Id: Icf4eb9ffeab410c01c68a031ec6704cd83c2681e
2016-02-10 17:51:47 +00:00
Reedy
00c426e3c2 Replace wfBaseConvert with Wikimedia\base_convert
Change-Id: Iadab3d018c3559daf79be90edb23d131729bdb68
2015-11-24 22:51:42 +00:00
Aaron Schulz
8ad6c52d4f Convert JobQueueDB to using the WAN cache
Change-Id: Ie5820d1439014572ca171c9303d51a8d3938ad00
2015-11-01 01:05:34 -08:00
Aaron Schulz
92bbfd5ea6 Migrate more callers away from $wgMemc
Callers should use more expliciy lazy-loaded
cache factory methods.

Change-Id: Ifa0bf389720a09a931ee6466b993f787d83a09a7
2015-10-26 19:07:12 +00:00
Aaron Schulz
fc662dcb71 Convert doBatchPushInternal to use startAtomic/endAtomic
This is less likely to cause nesting problems if the main
DB is used for the job table (e.g. stock installs)

Change-Id: I4c72688bd5d07a6b0626958869e6b386babbc5b3
2015-10-07 11:03:35 -07:00
Ori Livneh
427bdb6dbd jobqueue: use more sensible metric key names
* Since JobQueue metrics are qualified with 'jobqueue.', don't add a 'job-'
  prefix to each metric.
* Separate the key from the job type with a dot rather than a dash.
* To avoid having a Graphite node that is both a "directory" and a metric, use
  '.all' as a suffix for aggregates.

Change-Id: I2ac604d3c042dbfb0b3a27759800f435ec22041e
2015-06-14 22:38:02 -07:00
Aaron Schulz
dc4950a33b Implemented getAllAcquiredJobs in JobQueueDB
Change-Id: Ie9f0b9357b365f8bddd1f2fdcac11dec29aec876
2015-06-03 13:19:37 -07:00
Kunal Mehta
f138447de1 jobqueue: Record stats on how long it takes before a job is run
Bug: T101054
Change-Id: I5dc13d79a5ec2e8cb6679e3ff2535b5cb031ca30
2015-06-03 12:54:27 -07:00
Aaron Schulz
22734b3c0f Let deduplicateRootJob() accept JobSpecification for consistency
Change-Id: I872c2af40028e918fe6d9a8cd32ac97c70bffdae
2015-05-23 12:49:44 -07:00
jenkins-bot
2e89500994 Merge "Removed executeReadyPeriodicTasks() method" 2015-05-12 20:03:02 +00:00
Aaron Schulz
e5ff2d681f Send job ACKs to statsd
Change-Id: Idf6dcd6baf39484ac6fcf14465e13ae12405dd3a
2015-05-11 16:55:42 -07:00
Aaron Schulz
ec3da97659 Removed executeReadyPeriodicTasks() method
* Moved all these hacks to JobQueueDB, which is the only queue that
  should need this (for stock installs). Newer queues should always
  have the queue store manage stuff like this, not MediaWiki.
* This also avoids expensive object construction that does nothing
  when non-DB queues are used.

Change-Id: Id718cda25750be73044a049b39958cca55aa3172
2015-05-06 20:20:40 -07:00
Aaron Schulz
9c6721e38e Removed "empty" cache key from JobQueueDB for simplicity
Bug: T91815
Change-Id: I74d3f8257c728f3ec5d223cf8ca5e2f93aceab13
2015-04-27 20:49:35 +00:00
Ori.livneh
787f2dfc36 Revert "Added per-wiki queue stats information"
Creates too many metrics.
This reverts commit 340220080e.

Task: T95913
Change-Id: Ifa478996febcdd6b3687c4cb64b215495514a899
2015-04-20 19:31:03 +00:00
Aaron Schulz
f7f49dfb00 Made job factory() callers use Title::makeTitle
* The titles are not from user input and this simplifies the code

Change-Id: I067049cca5661b387076f0c28bc0b71d22162a0f
2015-04-13 21:31:29 +00:00
Aaron Schulz
37042262e3 Moved some JobQueueAggregator logic out of JobQueueGroup
Change-Id: I28ba1a25db225d4cf5f503a6c0f4405f13118151
2015-03-03 21:56:15 -08:00
Ricordisamoa
12dec5d85d Fix some stuttering in comments and documentation
Change-Id: I9c0088b9aab37335203cad45a1d6fa8ac3f43321
2014-12-17 19:44:10 +00:00
Aaron Schulz
87e33d67c9 Made JobQueueDB::doWaitForBackups wait for the right slaves
Change-Id: I6022fea7add5c317da89d5361d166a047bcc95e4
2014-09-24 13:07:34 -07:00
Thiemo Mättig
e292bc972d Finish removing boolean return values from JobQueue code
This is a follow-up for patch
Ia706ac0122a7dd7f418e2dc2d3bd36e9a0252c25.

Change-Id: I19fe58a939706d3f7594d937e0bcad6d97c52a50
2014-04-28 22:21:58 +02:00
umherirrender
dcf6955e5c Fixed some @params documentation (includes/*)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a
2014-04-20 23:33:05 +02:00
Aaron Schulz
340220080e Added per-wiki queue stats information
Change-Id: I25f42408c9a7a368aa99f4ceb04214f188a74be6
2014-04-03 21:42:10 +00:00
Alexandre Emsenhuber
449ee32451 Add missing line breaks to wfDebug() calls
Also removed true as second parameter to it from CloneDatabase.php
since it is the default value of that parameter.

Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642
2014-03-29 11:52:07 +01:00
Aaron Schulz
9ffd4f085d Renamed /job to /jobqueue
Change-Id: I4c8a2b42140630838867c77a70d45ba14b5d95e2
2014-03-14 13:42:04 -07:00
Renamed from includes/job/JobQueueDB.php (Browse further)