jenkins-bot has submitted this change and it was merged.
Change subject: Migration script: Set last revision ID when ignoring a row
......................................................................
Migration script: Set last revision ID when ignoring a row
Otherwise you enter an infinite loop when you ignore all rows in a batch
Bug: T62373
Change-Id: I08b3920940a1f60cd6d0ca03bd95262af0e02025
---
M migrateToRevDel.php
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/migrateToRevDel.php b/migrateToRevDel.php
index 0cc38ca..87088d2 100644
--- a/migrateToRevDel.php
+++ b/migrateToRevDel.php
@@ -121,12 +121,14 @@
array( 'LIMIT' => $this->mBatchSize, 'ORDER BY'
=> 'hidden_rev_id' ),
array( 'user' => array( 'INNER JOIN', 'user_id
= hidden_by_user' ) )
);
+
$insertLoggingData = array();
$insertRevisionData = array();
$insertArchiveData = array();
foreach ( $hiddenRows as $hiddenRow ) {
if ( Revision::newFromId(
$hiddenRow->hidden_rev_id ) ) {
$this->output( "Ignoring revision
{$hiddenRow->hidden_rev_id} as it is already in the revision table.\n" );
+ $lastRevId = $hiddenRow->hidden_rev_id;
continue;
}
$insertData = array();
@@ -171,6 +173,7 @@
__METHOD__
) ) {
$this->output( "Ignoring revision
{$hiddenRow->hidden_rev_id} as it is already in the archive table.\n" );
+ $lastRevId = $hiddenRow->hidden_rev_id;
continue;
}
--
To view, visit https://gerrit.wikimedia.org/r/231898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I08b3920940a1f60cd6d0ca03bd95262af0e02025
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Oversight
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits