jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/362177 )
Change subject: Force topics to be exported by UUID order
......................................................................
Force topics to be exported by UUID order
Bug: T164262
Change-Id: I3035314df21b48df47a120a18c818615a58546a0
---
M includes/Dump/Exporter.php
M includes/Search/Iterators/TopicIterator.php
2 files changed, 8 insertions(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, but someone else must approve
Mattflaschen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Dump/Exporter.php b/includes/Dump/Exporter.php
index 0f2bfd0..822d046 100644
--- a/includes/Dump/Exporter.php
+++ b/includes/Dump/Exporter.php
@@ -174,6 +174,7 @@
$headerIterator = Container::get(
'search.index.iterators.header' );
$topicIterator = Container::get(
'search.index.iterators.topic' );
+ $topicIterator->orderByUUID = true;
/** @var AbstractIterator $iterator */
foreach ( [ $headerIterator, $topicIterator ]
as $iterator ) {
$iterator->setPage(
$row->workflow_page_id );
diff --git a/includes/Search/Iterators/TopicIterator.php
b/includes/Search/Iterators/TopicIterator.php
index f15888b..22cc130 100644
--- a/includes/Search/Iterators/TopicIterator.php
+++ b/includes/Search/Iterators/TopicIterator.php
@@ -26,6 +26,7 @@
public function __construct( DbFactory $dbFactory, RootPostLoader
$rootPostLoader ) {
parent::__construct( $dbFactory );
$this->rootPostLoader = $rootPostLoader;
+ $this->orderByUUID = false;
}
/**
@@ -84,6 +85,11 @@
* {@inheritDoc}
*/
protected function query() {
+ if ( $this->orderByUUID ) {
+ $order = 'workflow_id ASC';
+ } else {
+ $order = 'workflow_last_update_timestamp ASC';
+ }
return $this->dbr->select(
[ 'flow_workflow' ],
// for root post (topic title), workflow_id is the same
as its rev_type_id
@@ -93,7 +99,7 @@
] + $this->conditions,
__METHOD__,
[
- 'ORDER BY' => 'workflow_last_update_timestamp
ASC',
+ 'ORDER BY' => $order,
]
);
}
--
To view, visit https://gerrit.wikimedia.org/r/362177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3035314df21b48df47a120a18c818615a58546a0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits