[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Limit paging size

2017-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/395886 )

Change subject: Limit paging size
..


Limit paging size

Per the DBA recommendation in T164990#3264314 / T168984#3659998,
limit paging sizes to 10 lists / 100 entries at a time.

For most queries this limits the number of rows scanned as well.
getListEntriesByDateUpdated is the only exception: it also scans
entries of deleted lists, which could result in an arbitrary
number of rows scanned. Fixing that is left to a separate patch.

Change-Id: I7c144fabcf5d7510a6b81ca85e623705daf01ccd
---
M src/Api/ApiQueryTrait.php
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mholloway: Looks good to me, approved



diff --git a/src/Api/ApiQueryTrait.php b/src/Api/ApiQueryTrait.php
index f090fa0..b95ea54 100644
--- a/src/Api/ApiQueryTrait.php
+++ b/src/Api/ApiQueryTrait.php
@@ -121,8 +121,9 @@
self::PARAM_DFLT => 10,
self::PARAM_TYPE => 'limit',
self::PARAM_MIN => 1,
-   self::PARAM_MAX => self::LIMIT_BIG1,
-   self::PARAM_MAX2 => self::LIMIT_BIG2,
+   // Temporarily limit paging sizes per 
T164990#3264314 / T168984#3659998
+   self::PARAM_MAX => self::$prefix === 'rl' ? 10 
: 100,
+   self::PARAM_MAX2 => null,
],
'continue' => [
self::PARAM_TYPE => 'string',

-- 
To view, visit https://gerrit.wikimedia.org/r/395886
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c144fabcf5d7510a6b81ca85e623705daf01ccd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReadingLists
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Limit paging size

2017-12-06 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/395886 )

Change subject: Limit paging size
..

Limit paging size

Per the DBA recommendation in T164990#3264314 / T168984#3659998,
limit paging sizes to 10 lists / 100 entries at a time.

For most queries this limits the number of rows scanned as well.
getListEntriesByDateUpdated is the only exception: it also scans
entries of deleted lists, which could result in an arbitrary
number of rows scanned. Fixing that is left to a separate patch.

Change-Id: I7c144fabcf5d7510a6b81ca85e623705daf01ccd
---
M src/Api/ApiQueryTrait.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReadingLists 
refs/changes/86/395886/1

diff --git a/src/Api/ApiQueryTrait.php b/src/Api/ApiQueryTrait.php
index f090fa0..b95ea54 100644
--- a/src/Api/ApiQueryTrait.php
+++ b/src/Api/ApiQueryTrait.php
@@ -121,8 +121,9 @@
self::PARAM_DFLT => 10,
self::PARAM_TYPE => 'limit',
self::PARAM_MIN => 1,
-   self::PARAM_MAX => self::LIMIT_BIG1,
-   self::PARAM_MAX2 => self::LIMIT_BIG2,
+   // Temporarily limit paging sizes per 
T164990#3264314 / T168984#3659998
+   self::PARAM_MAX => self::$prefix === 'rl' ? 10 
: 100,
+   self::PARAM_MAX2 => null,
],
'continue' => [
self::PARAM_TYPE => 'string',

-- 
To view, visit https://gerrit.wikimedia.org/r/395886
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c144fabcf5d7510a6b81ca85e623705daf01ccd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ReadingLists
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits