dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c1932e
)
Avoid wfWaitForSlaves() call when in a transaction in ActiveUsers
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 9 Jul 2014 20:02:22 +0000
(13:02 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 9 Jul 2014 20:02:29 +0000
(13:02 -0700)
* This does not do anything except waste time and connections.
The query should be small in that case anyway.
Change-Id: I010b3f09be36202ccf408e1a2b084fee0a598ff9
includes/specials/SpecialActiveusers.php
patch
|
blob
|
history
diff --git
a/includes/specials/SpecialActiveusers.php
b/includes/specials/SpecialActiveusers.php
index
8dc4b3c
..
e25955f
100644
(file)
--- a/
includes/specials/SpecialActiveusers.php
+++ b/
includes/specials/SpecialActiveusers.php
@@
-410,7
+410,9
@@
class SpecialActiveUsers extends SpecialPage {
}
foreach ( array_chunk( $newRows, 500 ) as $rowBatch ) {
$dbw->insert( 'querycachetwo', $rowBatch, __METHOD__ );
- wfWaitForSlaves();
+ if ( !$dbw->trxLevel() ) {
+ wfWaitForSlaves();
+ }
}
}