Removed cloudfiles dependency in SwiftFileBackend
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 8 Dec 2013 23:19:00 +0000 (15:19 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 8 Jan 2014 07:56:34 +0000 (23:56 -0800)
commit2af7ad827d67e5384dd2db5d194c6eab18004f1a
tree827f0f5fd4a4f71680e87a2f08ffd0a720093564
parenta2120b0bd0fed4dba09204f0bb2c4e477ac5b657
Removed cloudfiles dependency in SwiftFileBackend

* Added a new curl multi wrapper under libs/.
* Used the new MultiHttpClient class instead of CloudFiles
* Removed CDN related config and code as it does not work.
  well due to mutating files and tiny purge rate limits by CDNs.
* Also removed the unused and esoteric 'swiftAnonUser' parameter.
* Support concurrent 'describe' operations.
* Set ACLs on containers on intial PUT instead of in two steps.
  Previously if the second step failed, prepare() would never
  set the ACLs correctly since it aborts if the container exists.
* Improve token deletion to only trigger on 401s rather than other
  random errors like 50X timeouts.
* Removed duplicative getResponse* code by just using one closure
  called for both the concurrent and serial cases. Both cases are
  now funneled through doExecuteOpHandlesInternal().
* Add the MD5 to stat info, as it might be useful for speeding up
  the copy scripts in some cases (when both backends have md5 set).
* Avoid use of trigger_error() since there is a swift log group.
* A few other small code cleanups.

Change-Id: I1adb3e2df6df8cf01d3ad74158de96ea9a79da2e
includes/AutoLoader.php
includes/filebackend/SwiftFileBackend.php
includes/libs/MultiHttpClient.php [new file with mode: 0644]
tests/phpunit/includes/filebackend/FileBackendTest.php