dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename DB_SLAVE constant to DB_REPLICA
[lhc/web/wiklou.git]
/
maintenance
/
storage
/
recompressTracked.php
diff --git
a/maintenance/storage/recompressTracked.php
b/maintenance/storage/recompressTracked.php
index
8f717de
..
0a62103
100644
(file)
--- a/
maintenance/storage/recompressTracked.php
+++ b/
maintenance/storage/recompressTracked.php
@@
-154,7
+154,7
@@
class RecompressTracked {
*/
function syncDBs() {
$dbw = wfGetDB( DB_MASTER );
*/
function syncDBs() {
$dbw = wfGetDB( DB_MASTER );
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
$pos = $dbw->getMasterPos();
$dbr->masterPosWait( $pos, 100000 );
}
$pos = $dbw->getMasterPos();
$dbr->masterPosWait( $pos, 100000 );
}
@@
-190,7
+190,7
@@
class RecompressTracked {
* @return bool
*/
function checkTrackingTable() {
* @return bool
*/
function checkTrackingTable() {
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
if ( !$dbr->tableExists( 'blob_tracking' ) ) {
$this->critical( "Error: blob_tracking table does not exist" );
if ( !$dbr->tableExists( 'blob_tracking' ) ) {
$this->critical( "Error: blob_tracking table does not exist" );
@@
-305,7
+305,7
@@
class RecompressTracked {
* Move all tracked pages to the new clusters
*/
function doAllPages() {
* Move all tracked pages to the new clusters
*/
function doAllPages() {
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
$i = 0;
$startId = 0;
if ( $this->noCount ) {
$i = 0;
$startId = 0;
if ( $this->noCount ) {
@@
-374,7
+374,7
@@
class RecompressTracked {
* Move all orphan text to the new clusters
*/
function doAllOrphans() {
* Move all orphan text to the new clusters
*/
function doAllOrphans() {
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
$startId = 0;
$i = 0;
if ( $this->noCount ) {
$startId = 0;
$i = 0;
if ( $this->noCount ) {
@@
-480,7
+480,7
@@
class RecompressTracked {
} else {
$titleText = '[deleted]';
}
} else {
$titleText = '[deleted]';
}
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
// Finish any incomplete transactions
if ( !$this->copyOnly ) {
// Finish any incomplete transactions
if ( !$this->copyOnly ) {
@@
-590,7
+590,7
@@
class RecompressTracked {
* @param array $conds
*/
function finishIncompleteMoves( $conds ) {
* @param array $conds
*/
function finishIncompleteMoves( $conds ) {
- $dbr = wfGetDB( DB_
SLAVE
);
+ $dbr = wfGetDB( DB_
REPLICA
);
$startId = 0;
$conds = array_merge( $conds, [
$startId = 0;
$conds = array_merge( $conds, [
@@
-659,7
+659,7
@@
class RecompressTracked {
$trx = new CgzCopyTransaction( $this, $this->orphanBlobClass );
$trx = new CgzCopyTransaction( $this, $this->orphanBlobClass );
- $res = wfGetDB( DB_
SLAVE
)->select(
+ $res = wfGetDB( DB_
REPLICA
)->select(
[ 'text', 'blob_tracking' ],
[ 'old_id', 'old_text', 'old_flags' ],
[
[ 'text', 'blob_tracking' ],
[ 'old_id', 'old_text', 'old_flags' ],
[