Reduced LocalFileRestoreBatch::execute deadlocks when doing batch restores
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 7 Oct 2014 21:08:34 +0000 (14:08 -0700)
committerSpringle <springle@wikimedia.org>
Fri, 17 Oct 2014 04:07:54 +0000 (04:07 +0000)
commit745637c3da4b0157ca2b2fe7f93296721ebbb856
tree02dcc0abe472f4503343f347d8323ae8fcf212d5
parent8aa43d083f7767fffe300a17c4b255df7dabcfff
Reduced LocalFileRestoreBatch::execute deadlocks when doing batch restores

* Often users restore a batch of many files with similar names.
  This fails due to gap locking on non-existing rows which tangles up
  unrelated actions. Avoid that locking for the common case.
* This changes the return value of LocalFile::lock() from a useless
  one (due to the exception) to one that conveys some useful information.
  The method is fairly internal in any case.

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