From: Aaron Schulz Date: Wed, 7 Oct 2015 18:06:55 +0000 (-0700) Subject: Convert updateChunkStatus to using a flush commit() X-Git-Tag: 1.31.0-rc.0~9479^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=feb03ba80a85538ecabcbd908b930dda2d460bd6;p=lhc%2Fweb%2Fwiklou.git Convert updateChunkStatus to using a flush commit() This will at least warn if an explicit transaction from a caller via begin() is active Change-Id: Id4198cb35368c0d92cf8abfde46c75ea09fd8f96 --- diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index cc9f5c85fc..fe8b949235 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -237,7 +237,6 @@ class UploadFromChunks extends UploadFromFile { $dbw = $this->repo->getMasterDb(); // Use a quick transaction since we will upload the full temp file into shared // storage, which takes time for large files. We don't want to hold locks then. - $dbw->begin( __METHOD__ ); $dbw->update( 'uploadstash', array( @@ -248,7 +247,7 @@ class UploadFromChunks extends UploadFromFile { array( 'us_key' => $this->mFileKey ), __METHOD__ ); - $dbw->commit( __METHOD__ ); + $dbw->commit( __METHOD__, 'flush' ); } /**