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
Merge "Title::getTalkPage(): Restore behavior of interwiki-prefixed & fragment-only...
[lhc/web/wiklou.git]
/
includes
/
jobqueue
/
utils
/
PurgeJobUtils.php
diff --git
a/includes/jobqueue/utils/PurgeJobUtils.php
b/includes/jobqueue/utils/PurgeJobUtils.php
index
ef364b5
..
1e40eb4
100644
(file)
--- a/
includes/jobqueue/utils/PurgeJobUtils.php
+++ b/
includes/jobqueue/utils/PurgeJobUtils.php
@@
-65,7
+65,8
@@
class PurgeJobUtils {
$batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
$ticket = $lbFactory->getEmptyTransactionTicket( $fname );
$batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
$ticket = $lbFactory->getEmptyTransactionTicket( $fname );
- foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
+ $idBatches = array_chunk( $ids, $batchSize );
+ foreach ( $idBatches as $idBatch ) {
$dbw->update(
'page',
[ 'page_touched' => $now ],
$dbw->update(
'page',
[ 'page_touched' => $now ],
@@
-75,7
+76,9
@@
class PurgeJobUtils {
],
$fname
);
],
$fname
);
- $lbFactory->commitAndWaitForReplication( $fname, $ticket );
+ if ( count( $idBatches ) > 1 ) {
+ $lbFactory->commitAndWaitForReplication( $fname, $ticket );
+ }
}
}
) );
}
}
) );