jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/332952 )
Change subject: Avoid DBPerformance log warnings
......................................................................
Avoid DBPerformance log warnings
Also set doesWrites() to avoid POST warnings.
Change-Id: I24d60958a3903476fbb7ecc01274e3b481192578
---
M includes/main/SpecialSecurePoll.php
M includes/main/Store.php
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/main/SpecialSecurePoll.php
b/includes/main/SpecialSecurePoll.php
index e545ce7..4b13c59 100644
--- a/includes/main/SpecialSecurePoll.php
+++ b/includes/main/SpecialSecurePoll.php
@@ -31,6 +31,10 @@
$this->sp_context = new SecurePoll_Context;
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Show the special page
*
diff --git a/includes/main/Store.php b/includes/main/Store.php
index 4934f47..c71d625 100644
--- a/includes/main/Store.php
+++ b/includes/main/Store.php
@@ -130,7 +130,7 @@
function getElectionInfo( $ids ) {
$ids = (array)$ids;
- $db = $this->getDB();
+ $db = $this->getDB( DB_SLAVE );
$res = $db->select(
'securepoll_elections',
'*',
--
To view, visit https://gerrit.wikimedia.org/r/332952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I24d60958a3903476fbb7ecc01274e3b481192578
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jalexander <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits