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:
8872c11
)
Defer addAutopromoteOnceGroups to transaction idle
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 10 Jul 2014 18:22:03 +0000
(11:22 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 10 Jul 2014 18:22:03 +0000
(11:22 -0700)
* Extension callbacks in that method can be slow and show up in
dbperformance.log sometimes.
Change-Id: Idc30c29826e18c4e3287b06d4ce7bae72602e0ea
includes/page/WikiPage.php
patch
|
blob
|
history
diff --git
a/includes/page/WikiPage.php
b/includes/page/WikiPage.php
index
7c412ea
..
2ff72fd
100644
(file)
--- a/
includes/page/WikiPage.php
+++ b/
includes/page/WikiPage.php
@@
-2047,7
+2047,9
@@
class WikiPage implements Page, IDBAccessObject {
wfRunHooks( 'PageContentSaveComplete', $hook_args );
// Promote user to any groups they meet the criteria for
- $user->addAutopromoteOnceGroups( 'onEdit' );
+ $dbw->onTransactionIdle( function() use ( $user ) {
+ $user->addAutopromoteOnceGroups( 'onEdit' );
+ } );
wfProfileOut( __METHOD__ );
return $status;