Merge "rdbms: add transaction comment to IDatabase::masterPosWait()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 26 Oct 2018 20:20:37 +0000 (20:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Oct 2018 20:20:37 +0000 (20:20 +0000)
1  2 
includes/libs/rdbms/database/IDatabase.php

@@@ -595,7 -595,15 +595,7 @@@ interface IDatabase 
         * Execute a SELECT query constructed using the various parameters provided.
         * See below for full details of the parameters.
         *
 -       * @param string|array $table Table name
 -       * @param string|array $vars Field names
 -       * @param string|array $conds Conditions
 -       * @param string $fname Caller function name
 -       * @param array $options Query options
 -       * @param array $join_conds Join conditions
 -       *
 -       *
 -       * @param string|array $table
 +       * @param string|array $table Table name(s)
         *
         * May be either an array of table names, or a single string holding a table
         * name. If an array is given, table aliases can be specified, for example:
         * Do not use untrusted user input as a table name. Alias names should
         * not have characters outside of the Basic multilingual plane.
         *
 -       * @param string|array $vars
 +       * @param string|array $vars Field name(s)
         *
         * May be either a field name or an array of field names. The field names
         * can be complete fragments of SQL, for direct inclusion into the SELECT
         *
         * Use an empty array, string, or '*' to update all rows.
         *
 -       * @param string|array $options
 +       * @param string $fname Caller function name
 +       *
 +       * @param string|array $options Query options
         *
         * Optional: Array of query options. Boolean options are specified by
         * including them in the array as a string value with a numeric key, for
         *    - SQL_NO_CACHE
         *
         *
 -       * @param string|array $join_conds
 +       * @param string|array $join_conds Join conditions
         *
         * Optional associative array of table-specific join conditions. In the
         * most common case, this is unnecessary, since the join condition can be
        /**
         * Wait for the replica DB to catch up to a given master position
         *
+        * Note that this does not start any new transactions. If any existing transaction
+        * is flushed, and this is called, then queries will reflect the point the DB was synced
+        * up to (on success) without interference from REPEATABLE-READ snapshots.
+        *
         * @param DBMasterPos $pos
         * @param int $timeout The maximum number of seconds to wait for synchronisation
         * @return int|null Zero if the replica DB was past that position already,