aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend
Commit message (Collapse)AuthorAgeFilesLines
...
* docs: Remove ingroup tag from Markdown filesapaskulin2019-11-121-2/+0
| | | | | | | | | | This patch fixes the nesting issue in the Doxygen navigation by removing the @ingroup tag from class-level Markdown files. These files will now appear as top-level files in the navigation and are discoverable via links on the class pages. Bug: T87796 Change-Id: I370bfea3bf2a6816724d04b15107658f1c336f0f
* Add missing @param and @return to documentationUmherirrender2019-11-101-0/+1
| | | | Change-Id: Ibc5849cc8ea7e7c4eb30ded9c1cfa5f52187c377
* Deprecate FileJournal::factoryAryeh Gregor2019-11-042-5/+13
| | | | | | | | | Instead, the constructors for FileJournal and NullFileJournal should be treated as stable. I would have added @stable, but our linting doesn't recognize it yet and doesn't let. Bug: T235066 Change-Id: I7741055b4f00197d1346ebbfebc14f20238a06f3
* Merge "docs: Convert class-level documentation files to Markdown"jenkins-bot2019-11-011-28/+17
|\
| * docs: Convert class-level documentation files to Markdownapaskulin2019-10-311-28/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The FileRepo, FileBackend, and JobQueue classes include documentation files that don’t appear in the generated Doxygen docs. This PR: * Converts these files to Markdown * Links to each file from the respective class description * Adds an ingroup tag so the files appear in the sidebar at the module level * Updates the exclude pattern in the Doxyfile to surface these pages Bug: T87796 Change-Id: I94f0636ab489d741ab505f15da43a5d63c1ca61a
* | Merge "Hard-deprecate LockManagerGroup::getDefault/getAny"jenkins-bot2019-10-301-4/+8
|\ \
| * | Hard-deprecate LockManagerGroup::getDefault/getAnyAryeh Gregor2019-10-291-4/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | These appear to be unused. Moreover, their behavior doesn't match their documentation. getDefault() claims to return NullLockManager if no lock manager could be found, but really returns it if there's no lock manager named 'default'. getAny() claims to throw if no lock manager can be found, but actually throws if no lock manager is named 'default' or 'fsLockManager'. The behavior can be easily replicated by just using get() yourself and catching any exception. Bug: T234227 Change-Id: Iad083847f45d6e017a3f7dbfece1f9c155c5efd6
* / Convert FileBackendGroup to serviceAryeh Gregor2019-10-251-53/+74
|/ | | | | Bug: T234228 Change-Id: I25575f565eba122cdf971a5945572811d17fa3e1
* Fix new phan errors, part 2Daimona Eaytoy2019-10-122-2/+5
| | | | | | | Still mostly doc-only. Bug: T231636 Change-Id: I65cec6c716ce6859e14da00a12ef71e03603e59a
* filebackend: avoid use of wfWikiId() in FileBackendGroupAaron Schulz2019-09-241-2/+22
| | | | | | Also warn when there is a risk of automatic backend domain collisions Change-Id: Id488b5b947ef5fe8f4b0a8e96560bfd44fcc0327
* FileJournal testsAryeh Gregor2019-09-031-5/+9
| | | | | | | | | | | | | 100% unit test coverage for FileJournal and NullFileJournal. 100% integration test coverage for DBFileJournal. Unit tests for DBFileJournal once it supports injection. I removed FileJournal and NullFileJournal from the list of classes that FileBackendTest tests. It doesn't actually test them, it just happens to run code from them without checking its correctness at all. Depends-On: Ic22075bb5e81b7c2c4c1b8647547aa55306a10a7 Change-Id: I46d10ab7b87c23937aa04d7ec1922abfcf3bd611
* Merge "Integration tests for FileBackendGroup"jenkins-bot2019-08-281-0/+1
|\
| * Integration tests for FileBackendGroupAryeh Gregor2019-08-281-0/+1
| | | | | | | | | | | | | | 100% coverage except for one bit of the code that I didn't understand. Unit tests to come, together with rewrite as a service. Change-Id: Ib01758d994a9e5587a4fcb5edc3d80010ef05615
* | LockManagerGroup tweaksAryeh Gregor2019-08-282-19/+4
|/ | | | | | | | | | | One small change that was supposed to be in 5a6c18a0863 but didn't make it into the patch version that got merged, and removal of some long-dead code. phan objected to the use of new $class without being explicitly reassured that $class is, in fact, a string. I don't know why. Change-Id: Ifa00c59ab4464109414f21db37e3a6db21decdf3
* LockManagerGroupFactory to replace singletonsAryeh Gregor2019-08-272-48/+96
| | | | | | | | | | | 100% test coverage of code that appears to be working and used, in both LockManagerGroupFactory and also LockManagerGroup. Where possible I wrote it as unit tests. One preexisting code path seems to be broken and I marked the test as skipped. Two methods look unused and perhaps not especially helpful, so I didn't write tests for them yet in case we want to just get rid of them instead. Change-Id: Iaa7354f31c451b87773468609c674a3bf1d4382f
* Use local variabe $services instead of MediaWikiServices::getInstance()Fomafix2019-08-261-1/+1
| | | | Change-Id: Ieb6230231d9b916fd1366e7b473db00c87ac4428
* TempFSFileFactory serviceAryeh Gregor2019-08-211-2/+3
| | | | | | This replaces TempFSFile::factory(), which is now deprecated. Change-Id: I9e65c3867e26c16687560dccc7d9f3e195a8bdd6
* Code style cleanups to FileBackendGroupAaron Schulz2019-08-011-33/+35
| | | | | | | Set domainId in register() instead of on every config() call. Use array_merge() to make the override precedence clearer. Change-Id: I8792281cd9f1a4018255f9a9b87126c909095e68
* filebackend: avoid use of LoadBalancer::newMainLB() in LockManagerGroupAaron Schulz2019-07-161-4/+7
| | | | Change-Id: Iffe9f75ddc9cdbea8a4b5e1932dd55ae325f9dbc
* Fix/suppress misc phan errors (#5)Kunal Mehta2019-04-051-0/+1
| | | | | | Add lots of missing return statements, or remove incorrect doc blocks. Change-Id: I0881e98fbb9d0d4cf79ecc824064d24538055d3f
* Avoid use of deprecated "wikiId" parameter for FileBackendAaron Schulz2019-03-292-8/+14
| | | | | | Also cleaned up the parameter/field naming for DBFileJournal Change-Id: I70f2a870706f0813311a694cb8ea31ced58dcabb
* filebackend: change "profiler" parameter in FileBackend so it works againAaron Schulz2019-03-141-1/+3
| | | | | | | The Profiler::profileIn and Profiler::profileOut methods are just stubs. Use a callback to the Profile::scopedProfileIn method instead. Change-Id: I7b493c145357994f61faebfbe3f65d38d2e6da42
* Rename WikiMap DB domain ID methods to reduce confusion with web domainsAaron Schulz2019-02-061-1/+1
| | | | | | Those added in this same release do not need alias methods. Change-Id: I05feeb9b0b13afe43aea1f95551965489cdbe094
* Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMapAaron Schulz2018-10-292-1/+5
| | | | | | | | | Use these in place of various wfWikiID() calls. Also cleanup UserRightsProxy wiki ID variable names and removed unused and poorly named getDBname() method. Change-Id: Ib28889663989382d845511f8d34712b08317f60e
* filebackend: let any specific backend value of "readOnly" override the defaultAaron Schulz2018-07-191-3/+1
| | | | | | | Previously, only different reason strings could override, but there was no way to override the read-only mode to being off. Change-Id: I4266694034bfbdada90d4be96bcbc1a37f5b5409
* Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenientBartosz Dziewoński2018-05-301-10/+4
| | | | | | | | | | | | | | Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/ Replace with: '\1 ?? ' (Everywhere except includes/PHPVersionCheck.php) (Then, manually fix some line length and indentation issues) Then manually reviewed the replacements for cases where confusing operator precedence would result in incorrect results (fixing those in I478db046a1cc162c6767003ce45c9b56270f3372). Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
* Fix and improve PHPDoc type hints in FileBackend and FileRepoThiemo Kreuz2018-04-192-3/+3
| | | | Change-Id: I311b4a6777946b451d70c6fdb2133dbbd73f159f
* Use ::class to resolve class names in includes filesUmherirrender2018-01-272-6/+6
| | | | | | | This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: I07a925c2a9404b0865e8a8703864ded9d14aa769
* Remove leading backslashes from "use \…" tagsThiemo Mättig2017-12-281-1/+2
| | | | Change-Id: I494b029de089a07e3b946ee78293a12d5036f63e
* Replace MimeMagic::singleton() callsReedy2017-11-271-1/+1
| | | | Change-Id: Ieed41b5d6b0f568fe2872e7754f2feae7868fe7a
* update mediawiki-codesniffer to 0.11.0 and fix issuesWMDE-Fisch2017-08-111-1/+1
| | | | | | | | - mostly auto fixes - some too long lines fixed - ignore amp space in one case passing by reference Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
* Remove "@author Aaron Schulz" annotationsAaron Schulz2017-06-273-3/+0
| | | | | Bug: T139301 Change-Id: Ib5248e8e27d60611c7373bce4b29dd5e85aa3489
* Move DB errors to Rdbms namespaceAaron Schulz2017-04-152-0/+2
| | | | Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
* Move IDatabase/IMaintainableDatabase to Rdbms namespaceAaron Schulz2017-03-282-0/+4
| | | | Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
* Replace some of the deprecated wfGetLBFactory() callsWMDE-Fisch2017-02-071-1/+3
| | | | Change-Id: I87aa0ebe273706438f1634167de8c60f51432878
* Update weblinks in comments from HTTP to HTTPSFomafix2016-11-071-1/+1
| | | | | | | | Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link. Also update some defect links. Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
* Clean up some ObjectCache factory callersAaron Schulz2016-10-031-1/+2
| | | | | | | | * Use services container in more places. * Undeprecated getLocalServerInstance() since $fallback is not handled elsewhere. Change-Id: Id1fcd1c465d2d92653357523f4225f1c4d1ace2f
* 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