[FileBackend] MultiWrite code improvements and sanity checks.
authorAaron <aschulz@wikimedia.org>
Thu, 17 May 2012 23:34:52 +0000 (16:34 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Jul 2012 03:21:55 +0000 (03:21 +0000)
commit87d3f103967bcfb30d69cedd39a81e7e9a39ff05
treefa505f537fdfd9d917e9ed8fcacadbaa9bba3772
parentdf44d37af452a6ad84a404ce52536f5f92e5e958
[FileBackend] MultiWrite code improvements and sanity checks.

* Automatically override a few sub-backend settings in FileBackendMultiWrite.
  We should ignore locking, journaling, or read-only settings of sub-backends.
  Journaling is now done just for master sub-backend paths (under the proxy backend name).
  We don't need to log for each sub-backend, which is a waste of disk space.
* Changed FileBackendMultiWrite::doOperationsInternal() to be similiar to the
  other write functions. It now uses doOperations() of the sub-backends rather
  than manual code. This makes settings like 'concurrency' easier to manage;
  we might want to have some sub-backends with varying setings for that.
* Made FileBackendMultiWrite::doQuickOperationsInternal() compliant with docs.
* Added CHECK_SHA1 option for consistency checking.
* Fixed function visibility in two places.
* Improved multiwrite backend tests by calling consistencyCheck().

Change-Id: Iac7bfe10c77ecd069fb9ef0ec26a01512f5f4eea
includes/filerepo/backend/FileBackend.php
includes/filerepo/backend/FileBackendMultiWrite.php
includes/filerepo/backend/FileBackendStore.php
tests/phpunit/includes/filerepo/FileBackendTest.php