Merge "rdbms: add getChronologyProtectorClientId() to ILBFactory"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 20 Apr 2019 00:18:19 +0000 (00:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 20 Apr 2019 00:18:19 +0000 (00:18 +0000)
1  2 
includes/libs/rdbms/lbfactory/LBFactory.php

@@@ -399,7 -399,7 +399,7 @@@ abstract class LBFactory implements ILB
                                $lbs[] = $lb;
                        } );
                        if ( !$lbs ) {
 -                              return; // nothing actually used
 +                              return true; // nothing actually used
                        }
                }
  
                return strpos( $url, '?' ) === false ? "$url?cpPosIndex=$index" : "$url&cpPosIndex=$index";
        }
  
+       public function getChronologyProtectorClientId() {
+               return $this->getChronologyProtector()->getClientId();
+       }
        /**
         * @param int $index Write index
         * @param int $time UNIX timestamp; can be used to detect stale cookies (T190082)