jenkins-bot has submitted this change and it was merged.
Change subject: Switch commit() to commitMasterChanges() for better consistency
......................................................................
Switch commit() to commitMasterChanges() for better consistency
Change-Id: I0f7604b7c91ade016f3395d11f887b15f0b8673e
---
M DeleteBatch.body.php
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
Gilles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/DeleteBatch.body.php b/DeleteBatch.body.php
index 9d28d97..ca90c60 100644
--- a/DeleteBatch.body.php
+++ b/DeleteBatch.body.php
@@ -346,7 +346,7 @@
}
}
- $db->begin();
+ $db->startAtomic( __METHOD__ );
/* this stuff goes like articleFromTitle in Wiki.php */
// Delete the page; in the case of a file, this would be the
File: description page
if ( $pageExists ) {
@@ -365,7 +365,12 @@
// that didn't finish the job by deleting the file too.
$localFile->delete( $reason );
}
- $db->commit();
+ $db->endAtomic( __METHOD__ );
+ if ( $localFileExists ) {
+ // Flush DBs in case of fragile file operations
+ wfGetLBFactory()->commitMasterChanges( __METHOD__ );
+ }
+
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/304694
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0f7604b7c91ade016f3395d11f887b15f0b8673e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DeleteBatch
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits