DCausse has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/347601 )
Change subject: Fix dumpIndex.php
......................................................................
Fix dumpIndex.php
The logic was wrong and the dump was stopped too early.
I'm not even sure to understand how this code could have dumped
around 500k lines for some indices.
Bug: T162665
Change-Id: Iaff2270df785c856c45d6c1326a818bff236cac7
---
M maintenance/dumpIndex.php
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/01/347601/1
diff --git a/maintenance/dumpIndex.php b/maintenance/dumpIndex.php
index 00f791c..d54424d 100644
--- a/maintenance/dumpIndex.php
+++ b/maintenance/dumpIndex.php
@@ -123,6 +123,7 @@
$query = new Query();
$query->setStoredFields( [ '_id', '_type', '_source' ] );
+ $query->setSize( $this->inputChunkSize );
$query->setSort( [ '_doc' ] );
if ( $this->hasOption( 'sourceFields' ) ) {
$sourceFields = explode( ',', $this->getOption(
'sourceFields' ) );
@@ -160,13 +161,13 @@
];
$this->write( $document );
$docsDumped++;
- if ( $docsDumped > $limit ) {
+ if ( $docsDumped >= $totalDocsToDump ) {
break;
}
- $this->outputProgress( $docsDumped,
$totalDocsToDump );
}
+ $this->outputProgress( $docsDumped, $totalDocsToDump );
}
- $this->output( "Dump done.\n" );
+ $this->output( "Dump done ($docsDumped docs).\n" );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/347601
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaff2270df785c856c45d6c1326a818bff236cac7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits