From 86bf2319be3510ef87726974d902d93c63adce1e Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Wed, 14 Jul 2021 18:16:02 +0300 Subject: [PATCH] Remove Database#(start|end)Atomic method calls to prevent deadlocks Change-Id: Id10de191d03673c6445b1f971d7cf9407392f129 --- includes/AJAXPoll.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/includes/AJAXPoll.php b/includes/AJAXPoll.php index ac98713..7f0b704 100644 --- a/includes/AJAXPoll.php +++ b/includes/AJAXPoll.php @@ -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 ); }