Convenience aside, this lets multiwrite backends do async replication for
"store" operations safely, buy keeping a handle to the source file that
prevents it from getting prematurely deleted before the post-send writes
to the secondary backends can happen.
Bug: T91869
Change-Id: I1254de527c47835c35fed6e526b42953c1b2b2ca
I searched for /\$(\S+) = (.+?\(.*?\);)\n.*?\$\1\[/, ignored
everything involving isset(), unset() or array assigments, then
skimmed through the remaining results and changed things where they
made sense. These changes were not automated, so please review them.
Change-Id: Ib37b4c66fc57648470f151ad412210b3629c2538
The local temporary file might not live long enough to be
copied into storage during post-send.
Bug: T128124
Change-Id: Ifb5260958db008ec8b9f4db90f95a42e5ecaeadc
This is in line with FSFileBackend and is provides the calling
loop of a way to know the listing failed, rather than just
giving incomplete information.
Change-Id: I34c66d9dbf84e5f33982d17e61364c1595d3e9f7
The content type detector will now inspect the file contents
to better handle extensionless files.
Also dependency inject the callback and make the default one
use FileInfo.
Change-Id: Iad59bf6c6a416b706f976a4c425763fd30e2debb
Normalize all headers to lower case at the start of the
FileBackend operation methods. This makes it easy for
subclasses to check for certain headers, e.g. content-type.
Change-Id: Ia69976326d17a51bcaa61f2781aa669ae7bd9c28
* This will defer writes to non-master backends till the
end up the web request. This is useful for multi-DC setups.
Bug: T112708
Change-Id: I118c07764dd4a4f4f2590d4548238df12860e750
* A backend with this set (normally 1) will be used for
non-latest reads. This can be used to prefer a local,
replicated, backend instead of one farther away (for
multi-DC setups)
* Note that listings still come from the master always.
Bug: T112708
Change-Id: Ic4bf4ba5a2c9ef78abd11dbd0d4b48c73cad6923
* Just return the ScopedLock itself without wrappig it in an array.
This also makes getScopedLocksForOps() actually return the correct
type according to the docs
Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552
Also remove confusing use of $wgMemc in LoadMonitorMySQL which
should always be the same as wfGetMainCache().
Change-Id: I4fb9d075a37d3d45af71a5026ccf2eb17f24d7b0
* This used to relay back *all* of the GET headers, which includes
things that are not changeable (Content-Length) or make no sense
(x-trans-id). Only send the actual HTTP/metadata headers. Oddly
enough sending garbage headers gives a 2XX response, but does
not actually change anything in Swift.
Bug: T105810
Change-Id: Id4829cf998a6d8763fd26d49cd8d9c16cf5527dd
* If the POST failed but the sha1 was computed, then use
and cache that value rather than "false".
Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb