EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284354

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, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/54/284354/1

diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php
index 8b27ff7..e030aab 100644
--- a/maintenance/forceSearchIndex.php
+++ b/maintenance/forceSearchIndex.php
@@ -58,7 +58,7 @@
                        . "Note: All froms are _exclusive_ and all tos are 
_inclusive_.\n"
                        . "Note 2: Setting fromId and toId use the efficient 
query so those are ok.\n"
                        . "Note 3: Operates on all clusters unless --cluster is 
provided.\n";
-               $this->setBatchSize( 10 );
+               $this->setBatchSize( 100 );
                $this->addOption( 'from', 'Start date of reindex in 
YYYY-mm-ddTHH:mm:ssZ (exc.  Defaults to 0 epoch.', false, true );
                $this->addOption( 'to', 'Stop date of reindex in 
YYYY-mm-ddTHH:mm:ssZ.  Defaults to now.', false, true );
                $this->addOption( 'fromId', 'Start indexing at a specific 
page_id.  Not useful with --deletes.', false, true );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1790dc652af805606a03e35ceb26cd69e25cdbe6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

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

Reply via email to