Merge "Fixes to masterPosWait() for master switchovers"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 8 Mar 2016 12:09:57 +0000 (12:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 8 Mar 2016 12:09:57 +0000 (12:09 +0000)
1  2 
includes/db/IDatabase.php

@@@ -1183,14 -1183,13 +1183,13 @@@ interface IDatabase 
        public function wasReadOnlyError();
  
        /**
-        * Wait for the slave to catch up to a given master position.
+        * Wait for the slave to catch up to a given master position
         *
         * @param DBMasterPos $pos
-        * @param int $timeout The maximum number of seconds to wait for
-        *   synchronisation
-        * @return int Zero if the slave was past that position already,
+        * @param int $timeout The maximum number of seconds to wait for synchronisation
+        * @return int|null Zero if the slave was past that position already,
         *   greater than zero if we waited for some period of time, less than
-        *   zero if we timed out.
+        *   zero if it timed out, and null on error
         */
        public function masterPosWait( DBMasterPos $pos, $timeout );
  
         * @param string $fname
         * @param string $flush Flush flag, set to 'flush' to disable warnings about
         *   explicitly committing implicit transactions, or calling commit when no
 -       *   transaction is in progress. This will silently break any ongoing
 -       *   explicit transaction. Only set the flush flag if you are sure that it
 -       *   is safe to ignore these warnings in your context.
 +       *   transaction is in progress.
 +       *
 +       *   This will trigger an exception if there is an ongoing explicit transaction.
 +       *
 +       *   Only set the flush flag if you are sure that these warnings are not applicable,
 +       *   and no explicit transactions are open.
 +       *
         * @throws DBUnexpectedError
         */
        public function commit( $fname = __METHOD__, $flush = '' );