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:
5b5a9bf
)
Reduce deadlocks adding log rows to the RC table on delete
author
Aaron Schulz
<aschulz@wikimedia.org>
Tue, 10 Jun 2014 20:25:34 +0000
(13:25 -0700)
committer
Ori.livneh
<ori@wikimedia.org>
Wed, 11 Jun 2014 18:41:13 +0000
(18:41 +0000)
bug: 56776
Change-Id: Ic75530b25f3fa5668019c76ce59a1dda2768f389
includes/WikiPage.php
patch
|
blob
|
history
diff --git
a/includes/WikiPage.php
b/includes/WikiPage.php
index
52c5ccc
..
cedbcf9
100644
(file)
--- a/
includes/WikiPage.php
+++ b/
includes/WikiPage.php
@@
-2874,7
+2874,11
@@
class WikiPage implements Page, IDBAccessObject {
$logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
$logid = $logEntry->insert();
- $logEntry->publish( $logid );
+
+ $dbw->onTransactionPreCommitOrIdle( function() use ( $dbw, $logEntry, $logid ) {
+ // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+ $logEntry->publish( $logid );
+ } );
if ( $commit ) {
$dbw->commit( __METHOD__ );