jenkins-bot has submitted this change and it was merged.

Change subject: Increase forceSearchIndex.php batch size from 10 to 100
......................................................................


Increase forceSearchIndex.php batch size from 10 to 100

Reindexing in prod takes quite some time, even when batching into the
job queue. Part of that reason is because the database queries we issue
are rather unoptimized and take some time. Re-running those queries 10
rows at a time just makes it worse.

Best would be to optimize those queries, but increasing the default
batch size seems reasonable too. Alternatively we could just update the
documentation on wikitech to always use the batch size argument, but I
don't see any great reason to default to such a small batch size
anyways.

Change-Id: I1790dc652af805606a03e35ceb26cd69e25cdbe6
---
M maintenance/forceSearchIndex.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index 8b27ff7..1c0002a 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -140,6 +140,11 @@
                if ( $this->getOption( 'forceParse' ) ) {
                        $updateFlags |= Updater::FORCE_PARSE;
                }
+               if ( !$this->getOption( 'batch-size' ) &&
+                       ( $this->getOption( 'queue' ) || $this->getOption( 
'deletes' ) )
+               ) {
+                       $this->setBatchSize( 100 );
+               }
 
                $this->namespace = $this->hasOption( 'namespace' ) ?
                        intval( $this->getOption( 'namespace' ) ) : null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1790dc652af805606a03e35ceb26cd69e25cdbe6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to