aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup MemcLockManager and move it to /libsAaron Schulz2016-09-301-386/+0
| | | | | | | | | | | | * Remove wf* function and ObjectCache dependencies. * Use the base class session field. * Lower physical lock structure TTL and move it to the base class as a constant. * Resolve TODO about acquiring mixed lock types in one pass. * Only mark servers down for 30 seconds in case of long-running scripts. Change-Id: Icd4be407e599524cc620975d27e85666d2532b95
* Make multi-write backend "template" config work as expectedAaron Schulz2016-09-291-24/+25
| | | | | | | | | * FileBackendGroup now applies the usual config for these sub-backends, the same config get() applies. * Also make sure FileBackendMultiWrite::concatenate() uses the status wrapper. Bug: T146904 Change-Id: I1e9b5027dbac11ea9484cd16851e5db998574429
* Move SwiftFileBackend to /libsAaron Schulz2016-09-241-1937/+0
| | | | Change-Id: Ied0be9891d70930caf415d75cb3b89043347f47e
* Depedencency cleanups to SwiftFileBackendAaron Schulz2016-09-242-30/+28
| | | | | | | | * Avoid wf* function MediaWiki dependencies. * Don't bother with getLocalClusterInstance() caching for the CLI case. * Give FileBackend a default 'resetOutputBuffer' callback. Change-Id: I359da1ad77c62880ea799b65cd3a16ad673a64eb
* Move FSFilebackend and MemoryFileBackend to /libsAaron Schulz2016-09-242-1247/+0
| | | | Change-Id: Id38a2ef9e0e22537d0267b536f8a4dfd60c5b41d
* Remove wf* function usage from FSFileBackendAaron Schulz2016-09-232-37/+44
| | | | Change-Id: Iad6471724f8cdc596c755e6194da7556158e9203
* Merge "Move FileBackendStore and FileOp classes to /libs"jenkins-bot2016-09-233-3037/+0
|\
| * Move FileBackendStore and FileOp classes to /libsAaron Schulz2016-09-233-3037/+0
| | | | | | | | Change-Id: If490f64bec282e5dfcdaf7feb1cbf46d3dce1064
* | Merge "Move RedisLockManager to /libs"jenkins-bot2016-09-232-282/+6
|\ \
| * | Move RedisLockManager to /libsAaron Schulz2016-09-232-282/+6
| | | | | | | | | | | | Change-Id: Ia476f117243cf0f6984e373d460b24db18584704
* | | Merge "Move RedisConnectionPool to /libs/redis"jenkins-bot2016-09-232-3/+12
|\| | | |/ |/|
| * Move RedisConnectionPool to /libs/redisAaron Schulz2016-09-232-3/+12
| | | | | | | | Change-Id: Ied4a85d7172ab76b90f6d9ce4d47a83c3fd7d111
* | Remove wfDebugLog() dependency from FileOp classesAaron Schulz2016-09-232-3/+10
| | | | | | | | Change-Id: Ib8ab9edd1afdb28f7444f5e13cf34a696a066234
* | Merge "Add HTTPFileStreamer class"jenkins-bot2016-09-232-10/+17
|\ \
| * | Add HTTPFileStreamer classAaron Schulz2016-09-232-10/+17
| | | | | | | | | | | | | | | | | | | | | * Move most StreamFile code to this new class * Remove StreamFile depedency from FileBackendStore Change-Id: I4a272ef49497b589114fc2b37ba800bc26d9161f
* | | Move FileBackendMultiWrite to /libsAaron Schulz2016-09-232-761/+9
|/ / | | | | | | Change-Id: I8079693a62db390028cd9f72b2bd7a81ae1164c3
* | Dependency cleanups to FileBackendStoreAaron Schulz2016-09-234-47/+51
| | | | | | | | | | | | | | | | | | | | * Inject a PSR logger in place of wf* logging methods. * Replace wfTimestamp() call with ConvertableTimestamp. * Inject the Profiler object. * Rename $wiki => $domain to avoid "wiki" mentions. * Remove stray FSFile::extractImageSizeInfo() method. Change-Id: I3e3a43d36506bec341dc5727b52f5f5a5d32bff5
* | Code comment and style cleanups to MysqlLockManagerAaron Schulz2016-09-231-6/+17
|/ | | | Change-Id: Idf05c0c44f5f6fbb373625c0aebe015e385700ce
* Move more LockManager classes to /libsAaron Schulz2016-09-222-314/+0
| | | | Change-Id: I4bfa79f430827b8717a57bb61cb7c36bc7fcb489
* Merge "Inject "srvCache" and local DB connections into LockManagerDB"jenkins-bot2016-09-233-52/+45
|\
| * Inject "srvCache" and local DB connections into LockManagerDBAaron Schulz2016-09-193-52/+45
| | | | | | | | | | | | | | * Also simplified the srvCache variable usage to be unconditional. * The wfRandomString() call has also been replaced. Change-Id: I17e83b17ec549906ee200bbe9eb2f0b151423e26
* | Simplify and clean up FileBackend exceptionsAaron Schulz2016-09-224-16/+17
| | | | | | | | | | | | | | | | Use standard exceptions for unexpected errors and remove FileBackendException class, leaving FileBackendError. The later is actually intended to be caught in some cases. Change-Id: I735a525e0b14e518b2da5f18762e0f293064dfc2
* | Remove MimeMagic depedency from FSFile and move it to /libsAaron Schulz2016-09-222-464/+0
| | | | | | | | Change-Id: Ieaae909b49c798b6e9bed65d15961cefbdaec49b
* | Merge "Migrate callers to new MWFileProps::getPropsFromPath() method"jenkins-bot2016-09-221-15/+16
|\ \
| * | Migrate callers to new MWFileProps::getPropsFromPath() methodAaron Schulz2016-09-221-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FSFile should not be responsible for handling this much logic. * Make more MediaHandler classes aware of the fact that an object other than File might be passed in. Use the FSFile instead of a useless empty stdClass object. * Also added more fields to FSFile::placeholderProps to make it more complete. Change-Id: I9fe764b2a7261af507c6555e6a57273cf7d00d36
* | | Dependency inject $wgTmpDirectory into FileBackend classesAaron Schulz2016-09-214-5/+6
|/ / | | | | | | Change-Id: I219daffa67ff672bf5bd38921f4b1ca058d96b0f
* | Merge "FSFile and TempFSFile cleanups"jenkins-bot2016-09-202-19/+45
|\ \
| * | FSFile and TempFSFile cleanupsAaron Schulz2016-09-192-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove wf* function dependencies. This includes wfTempDir(). Callers now should specify the directory, though it will try to do most of the wfTempDir() logic anyway if they do not. * Update callers to inject wfTempDir() so $wgTmpDirectory is used by TempFSFile instead of it probing to find a valid directory itself. * Move most of the wfTempDir() logic to TempFSFile::getUsableTempDirectory(). * Remove unused getMimeType() method. Change-Id: Idd55936b07f9448a6c90577708722b7b52b8fe66
* | | Move some FileBackend related classes to /libsAaron Schulz2016-09-194-1941/+1
| |/ |/| | | | | Change-Id: I0c3a84c2ed8b869519f4d38475a77539c24a88a8
* | Make LockManager use StatusValue and move classes to /libsAaron Schulz2016-09-199-775/+16
| | | | | | | | Change-Id: Ifa41fc2939f3515d4a056746b0fcbff79786d25b
* | Remove wf* function dependencies from FSLockManagerAaron Schulz2016-09-182-5/+10
|/ | | | Change-Id: I52f08c6e7372ddbbcc1b5f82d505e435b01ff138
* Make Status extend StatusValue and start FileBackend updateAaron Schulz2016-09-1717-248/+284
| | | | | | | | | | | | | | * This avoids code duplication. * Callers can safely start type-hinting StatusValue as well. * Also moved the wrap() logic out of Status::__construct(), which only wrap() was (and should have been) using. Use "static" as well, so subclass behave properly. * The docs and type-hints in /filebackend are updated as an example. * A migration pattern is to inject a StatusValue wrapper into the backend and use it on all returned statuses, so MediaWiki will still get Status for message methods. Change-Id: Iff9255f34870ea6b0c4b91f6ddc69eea95186aba
* Switch some callers to WaitConditionLoopAaron Schulz2016-09-082-24/+26
| | | | | | Also fixed up backwards documentation Change-Id: I00c36aa751a79ca86a754e049a6da78cbb417b81
* Documentation: Replace misuse of 'later' when we meant 'latter'James D. Forrester2016-09-072-2/+2
| | | | Change-Id: I01bfdb8e0bfaa132533732873f7c840cea7935eb
* Clean array() syntax in docs, part VAmir Sarabadani2016-09-051-28/+28
| | | | Change-Id: Ic65b7b2f1c2396246a3825c8d06d42bd6d06c37e
* Use WAN cache adaptiveTTL() method in FileBackendStoreAaron Schulz2016-09-021-2/+2
| | | | Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d
* Merge "A few more DBLockManager fixes and cleanups"jenkins-bot2016-08-242-17/+24
|\
| * A few more DBLockManager fixes and cleanupsAaron Schulz2016-08-222-17/+24
| | | | | | | | | | | | | | | | | | | | | | * Do not do the connection init step if the same DB handle as wfGetDB( DB_MASTER ) is being used to avoid clobbering it. * Remove begin(), since only one of the subclasses wants transactions. That one now uses startAtomic() now. * Make getConnection() throw an error for bad config instead of return null, which was not documented or expected. Change-Id: Ib09a7972d6569c29e83e329a8f7f9f47a393b896
* | Fix broken lockmanager-fail-releaselock status messagesAaron Schulz2016-08-231-4/+8
|/ | | | Change-Id: Icb0cfa6e38bc81c35430023afe50dd94ef3b2013
* Split DBLockManager classes into their own filesAaron Schulz2016-08-203-202/+202
| | | | Change-Id: If903a90a5be2d6ff11504d34eb125e86c1ab1191
* Fix DBLockManager commentsAaron Schulz2016-08-151-3/+4
| | | | Change-Id: I5431caf4b80995c71d4bc5ab739954d70081111a
* Unbreak "localDBMaster" mode in MySqlLockManager by using a separate connectionAaron Schulz2016-07-291-6/+13
| | | | Change-Id: I4f9328e1555d814e0849cea86aca20896c6dfacf
* filebackend: Fix DBLockManager IDEA warningsAaron Schulz2016-07-221-2/+4
| | | | Change-Id: I5e671bcee0915f65082c139be8f42aafad6413f1
* Added Range support to FileBackend::streamFile()Aaron Schulz2016-06-044-44/+65
| | | | | | | | | | | | | | | | | * Added HTTP options headers parameter to streamFile(). * Refactored doStreamFile() to either call StreamFile::stream() or delagate that to the subclass. SwiftFileBackend now relays the full Swift response rather than manually making the headers. This also makes Range headers easy to support. * Made use of this in img_auth.php for performance on private wikis. * Elimate stat call in streamFile() for Swift if "headers" is empty. * Refactored StreamFile a bit to inject request headers instead of using the $_SERVER global. A header options parameter is used instead, which also supports Range. * Removed now unused prepareForStream(). * Cleaned up streamFile() unit tests. Change-Id: I2ccbcbca6caabb8cf65bd6b3084cede2e6ea628a
* Log when resyncFiles() fails in FileBackendMultiWriteAaron Schulz2016-04-291-0/+5
| | | | | | | This distinguishes cases that recover from sync errors from those that do not. Change-Id: Ibcdea18041e7344077c8308359a1a6087139f2e0
* Optimize consistencyCheck() in FileBackendMultiwriteAaron Schulz2016-04-271-0/+6
| | | | | | | | doOperationsInternal() already set "preserveCache" but never actually filled it in to begin with. This should lower round trips if sync checks are enabled. Change-Id: Ica67b8d66e7602faed842408365edbd466688f61
* Merge "More FSFile docs"jenkins-bot2016-04-121-2/+24
|\
| * More FSFile docsAaron Schulz2016-04-121-2/+24
| | | | | | | | Change-Id: I1ca3e0bc9d5db4ca043f313fb15a780ae102c50a
* | filebackend: Make resyncFiles() easier to useAaron Schulz2016-04-121-4/+7
|/ | | | | | | Pass in the resync mode as a flag instead of using the object instance. Change-Id: I2da661a65afd712403db936b6e31fba8e8069096
* Kill mbstring fallbacksMax Semenik2016-04-061-1/+1
| | | | | | | | In the age when we require PHP 5.5, pretending that mbstring emulation is not slow and silly is silly. Bug: T129435 Change-Id: Ic8235c9da9a926df63ec7388900c44eab454eebe