mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-23 22:46:17 +00:00
Merge "Remove Database#(start|end)Atomic method calls to prevent deadlocks"
This commit is contained in:
commit
a14c460c51
|
@ -53,7 +53,6 @@ class AJAXPoll {
|
|||
$lines = explode( "\n", trim( $input ) );
|
||||
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->startAtomic( __METHOD__ );
|
||||
|
||||
/**
|
||||
* Register poll in the database
|
||||
|
@ -111,8 +110,6 @@ class AJAXPoll {
|
|||
}
|
||||
}
|
||||
|
||||
$dbw->endAtomic( __METHOD__ );
|
||||
|
||||
switch ( $lines[0] ) {
|
||||
case 'STATS':
|
||||
$ret = self::buildStats();
|
||||
|
@ -197,7 +194,6 @@ During the last 48 hours, $tab2[0] votes have been given.";
|
|||
}
|
||||
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
$dbw->startAtomic( __METHOD__ );
|
||||
|
||||
if ( $answer != 0 ) {
|
||||
$answer = ++$answer;
|
||||
|
@ -222,8 +218,6 @@ During the last 48 hours, $tab2[0] votes have been given.";
|
|||
$pollContainerText = self::revokeVote( $dbw, $id, $user );
|
||||
}
|
||||
|
||||
$dbw->endAtomic( __METHOD__ );
|
||||
|
||||
return self::buildHTML( $id, $user, false, '', $pollContainerText );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue