Avoid use of DB rollback() in LocalFileMoveBatch
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 21 Jul 2016 06:17:25 +0000 (23:17 -0700)
committerOri.livneh <ori@wikimedia.org>
Mon, 25 Jul 2016 22:16:20 +0000 (22:16 +0000)
commitad95e0182356224dce27f53f7bbea24ffbcb22a7
tree7773efc6ce4c158c6add356f8c3924e419c966ad
parent875342fd7ae2ad8c994a84d883f19f9627f31de8
Avoid use of DB rollback() in LocalFileMoveBatch

* Verify the DB updates and bail before doing anything instead
  of relying on rollback() if something does not match up.
* Do the file copying before updating the DB so that there is
  nothing to rollback if they fail.
* Improved failCount in case the current version is missing.
  It should also reflect all the missing old versions.

Change-Id: Ie2d316548d8e5584cc69bb9f1425db108b05be5c
includes/filerepo/file/LocalFile.php