Merge "Avoid high edit stash TTLs when a user signature was used"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 7 Jul 2017 01:21:30 +0000 (01:21 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 7 Jul 2017 01:21:30 +0000 (01:21 +0000)
includes/api/ApiBase.php
includes/objectcache/SqlBagOStuff.php

index 2dcece1..bc3def8 100644 (file)
@@ -894,7 +894,7 @@ abstract class ApiBase extends ContextSource {
         * Get a WikiPage object from a title or pageid param, if possible.
         * Can die, if no param is set or if the title or page id is not valid.
         *
-        * @param array $params
+        * @param array $params User provided set of parameters, as from $this->extractRequestParams()
         * @param bool|string $load Whether load the object's state from the database:
         *        - false: don't load (if the pageid is given, it will still be loaded)
         *        - 'fromdb': load from a replica DB
@@ -935,7 +935,7 @@ abstract class ApiBase extends ContextSource {
         * Can die, if no param is set or if the title or page id is not valid.
         *
         * @since 1.29
-        * @param array $params
+        * @param array $params User provided set of parameters, as from $this->extractRequestParams()
         * @return Title
         */
        public function getTitleFromTitleOrPageId( $params ) {
index 6c10301..70795ec 100644 (file)
@@ -148,7 +148,7 @@ class SqlBagOStuff extends BagOStuff {
        protected function getSeparateMainLB() {
                global $wgDBtype;
 
-               if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) {
+               if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) {
                        if ( !$this->separateMainLB ) {
                                // We must keep a separate connection to MySQL in order to avoid deadlocks
                                $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
@@ -156,8 +156,7 @@ class SqlBagOStuff extends BagOStuff {
                        }
                        return $this->separateMainLB;
                } else {
-                       // However, SQLite has an opposite behavior. And PostgreSQL needs to know
-                       // if we are in transaction or not (@TODO: find some PostgreSQL work-around).
+                       // However, SQLite has an opposite behavior due to DB-level locking
                        return null;
                }
        }