Manybubbles has uploaded a new change for review.

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

Change subject: Add index script option to just do allocation
......................................................................

Add index script option to just do allocation

Change-Id: I7c55d3cd70ba43e70e3a645a6d7fc406c438fa29
---
M maintenance/updateOneSearchIndexConfig.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 4c884a2..bda55d0 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -156,6 +156,9 @@
                $maintenance->addOption( 'justCacheWarmers', 'Just validate 
that the cache warmers are correct ' .
                        'and perform no additional checking.  Use when you need 
to apply new cache warmers but ' .
                        "want to be sure that you won't apply any other changes 
at an inopportune time." );
+               $maintenance->addOption( 'justAllocation', 'Just validate the 
shard allocation settings.  Use ' .
+                       "when you need to apply new cache warmers but want to 
be sure that you won't apply any other " .
+                       'changes at an inopportune time.' );
        }
 
        public function execute() {
@@ -206,6 +209,12 @@
                                return;
                        }
 
+                       if ( $this->getOption( 'justAllocation', false ) ) {
+                               $shardAllocation = new 
\CirrusSearch\Maintenance\ShardAllocation( $this->getIndex(), $this );
+                               $shardAllocation->validate();
+                               return;
+                       }
+
                        $this->indexIdentifier = 
$this->pickIndexIdentifierFromOption( $this->getOption( 'indexIdentifier', 
'current' ) );
                        $this->pickAnalyzer();
                        $this->validateIndex();

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

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

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

Reply via email to