Merge "Remove Database#(start|end)Atomic method calls to prevent deadlocks"

This commit is contained in:
jenkins-bot 2021-07-25 10:01:59 +00:00 committed by Gerrit Code Review
commit a14c460c51

View file

@ -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 );
}