Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/133268
Change subject: Use FOR UPDATE in prior LocalFile timestamp check ...................................................................... Use FOR UPDATE in prior LocalFile timestamp check * This covers the case with a snapshotted transaction outside of lock()/unlock() Change-Id: I8639c2e51cb918f452dc1576681d6224fb4fb2c0 --- M includes/filerepo/file/LocalFile.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/68/133268/1 diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index e8f70fc..a8fa8bd 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1249,8 +1249,9 @@ } if ( $timestamp === false ) { + // Use FOR UPDATE in case lock()/unlock() did not start the transaction $ltimestamp = $dbw->selectField( 'image', 'img_timestamp', - array( 'img_name' => $this->getName() ), __METHOD__ ); + array( 'img_name' => $this->getName() ), __METHOD__, array( 'FOR UPDATE' ) ); $ltime = $ltimestamp ? wfTimestamp( TS_UNIX, $ltimestamp ) : false; $ctime = time(); // Avoid a timestamp that is not newer than the last version -- To view, visit https://gerrit.wikimedia.org/r/133268 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8639c2e51cb918f452dc1576681d6224fb4fb2c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits