| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 'b' param in some fopen() calls as needed for Windows and newline handling.
* Removed some useless padding code in FileBackend::getContainerShard(). Initialized $m to make IDE happy.
* Updated some code comments.
In SwiftFileBackend:
* Manually set the ETag when using php-cloudfiles for creating files to avoid https://github.com/rackspace/php-cloudfiles/issues/59.
* Manually set the content type based on how StreamFile::getType(). This makes it safe to read files directly out of the proxy to end-users. The streamFile() backend functions already uses a similar content-type check.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109980
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109938
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109904
|
|
|
|
|
|
|
| |
* Improved $this->lockCount check in LockServerDaemon
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109901
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Ternary operator avoided a call to wfWikiID()
* We really want to explicitly choose the manager
use LockManagerGroup->get( 'nullLockManager' )
* defaultConfig no more needed if it handles just one parameter that
we want to set explicitly
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109855
|
|
|
|
|
|
|
|
|
|
|
| |
new FileRepo() requires an array of parameters having at least the
'name' and 'backend' key setup.
TODO: 'backend' keyword should probably default to FileBackend.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109824
|
|
|
|
|
|
|
|
|
|
| |
When creating a file but ommitting the 'content' key, it would throw
a notice. Using getParams let us forget about the 'content' key and
hence create files with no content.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109823
|
|
|
|
|
|
|
|
| |
Use the default array added by r109814
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109815
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109814
|
|
|
|
|
|
|
|
|
| |
* Made FileBackend::getFileProps() final.
* Added exception needed in SwiftFileBackend::getConnection().
* Various FileBackendTests fixes and additions. Optimized it a bit by keeping the backend instance in memory.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109809
|
|
|
|
|
|
|
| |
use wfTimestamp()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109719
|
|
|
|
|
|
|
| |
* Fixed bogus array key reference in SwiftFileBackend constructor
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109706
|
|
|
|
|
|
|
|
| |
* Clear container cache in SwiftFileBackend when clearCache() is called
* Updated a comment and fixed a comment typo
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109703
|
|
|
|
|
|
|
| |
* Made use of FileRepo::cleanupBatch() in ForeignAPIFile::purgeThumbnails()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109664
|
|
|
|
|
|
|
|
|
|
| |
parent directories.
* In StoreBatchTest: sed proper clean() function to remove temp dirs (follows up r109641). Also removed some commented out code.
* Fixed temp dir leakage in FileBackendTest.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109659
|
|
|
|
|
|
|
| |
it will just clear the FileBackend cache and refetch the same cached data from PHP's stat cache.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109652
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also lock parent directories to avoid prepare()/clean() race conditions for FS backends.
* Fixed bogus $params var in logException() call in SwiftFileBackend.
* Added 'latest' param to FileBackendMultliWrite::consistencyCheck().
* Dummy-proof FileBackend::getFileStat() w.r.t the 'latest' param and removed related FileOp::allowStaleReads() comment.
* Tweaked backend-fail-batchsize message from r109469.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109583
|
|
|
|
|
|
|
| |
which is shorter and more consistent with 'overwriteSame'
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109473
|
|
|
|
|
|
|
|
|
| |
* Added a sane default max file size to FileBackend. Operation batches need to check this before trying anything.
* Temporarily adjust the PHP execution time limit in attemptBatch() to reduce the chance of dying in the middle of it. Also added a maximum batch size limit.
* Added some code comments.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* r108944: doCleanInternal() should delete empty containers only if the container dir was given.
* Made doSecureInternal() set container permissions. Also renamed swiftProxyUser -> swiftAnonUser.
* Made doGetFileStat() respect the 'latest' parameter (using r109235).
* Fixed connTTL default and renamed it to authTTL. Also added explicit close() call to getConnection().
* Reduced RTTs in doPrepareInternal() by checking getContainer() first (which is process cached).
* Killed an RTT in doStoreInternal(), doCreateInternal(), and doCopyInternal() by using create_object(). Also cleaned up logic with regards to the destination CF_Object object fields getting preloaded before write().
* Cleanups to getLocalCopy(); only create the tmp file if get_object() succeeds to short-circuits things.
* Made getContainer() limit the container cache size for sanity.
* Simplified doDeleteInternal() code a bit.
* Renamed $destRel => $dstRel for consistency.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109428
|
|
|
|
|
|
|
| |
* Code comment tweaks and fixes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109106
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109071
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added SHA-1 to FileOp::attemptBatch $predicates (since concatenate was removed from FileOp). This lets us get rid of temp file backups, as the remaining failure case is just the backend medium going down (the ops would break in that case anyway). Doing so reduces RTTs and backup file I/O overhead. This also simplifies expiry object support by avoiding having to stash the expiry values of temp backup objects somewhere.
* Improved precheck() and attempt() status logic in FileOp::attemptBatch() a bit. Use separate $subStatus var to check if each op is OK.
* A few minor code cleanups and comment tweaks.
* Fixed MoveFileOp bug found in unit tests when the source/dest are the same and an overwriteDest/overwriteSame param is given (the file would just get deleted). Improved CopyFileOp in this case too.
Other:
* Added more unit tests.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109009
|
|
|
|
|
|
|
|
|
| |
existence in FileBackend::streamFile()
* A few minor code cleanups and comment tweaks.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/109007
|
|
|
|
|
|
|
| |
it's 'object_count' not 'count'
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108945
|
|
|
|
|
|
|
|
|
|
| |
* Added getContainer(), createContainer(), and deleteContainer() helper functions, which cache container objects to avoid RTTs
* Made doCleanInternal() delete empty containers
* Bumped authentication TTL to 120 seconds
* Some comment tweaks
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108944
|
|
|
|
|
|
|
|
| |
* Made DBLockManager constructor a bit more convenient to use with just 'localDBMaster' in the db buckets.
* Documentation tweaks.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108891
|
|
|
|
|
|
|
|
|
| |
* Renamed FSFileIterator -> FSFileBackendFileList
* Renamed SwiftFileIterator -> SwiftFileBackendFileList and added it to autoloader
* A few minor doc fixes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108889
|
|
|
|
|
|
|
| |
has multiple identical versions. The operation would fail due to the file already existing.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108886
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Made secure() call doPrepare() for caller dummy proofing (especially those that don't check the status).
In FSFileBackend:
* Removed redundant wfMkdirParents() calls in FSFileBackend, we already have prepare() for this purpose. This also keeps it's behavior more consistent with the other backends.
* Made use of 'backend-fail-store' message in doStoreInternal().
Other:
* Updated unit tests and renamed $src => $source in some functions for consistency.
* Added some documentation comments and @since tags.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108878
|
|
|
|
|
|
|
|
| |
* Added clearstatcache() to doConcatenate() to make it safe for callers to stat the file.
* A few minor comment tweaks.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108791
|
|
|
|
|
|
|
| |
More doucmentations
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108786
|
|
|
|
|
|
|
|
|
|
|
| |
FileBackend::normalizeStoragePath(). Also renamed the function to normalizeContainerPath() to be less confusing.
* Made SwiftFileBackend respect the 'latest' parameter of various functions via "X-Newest: true" header. Added to TODO in the doGetFileStat() function, as cloudfiles needs upstream changes for that.
* Fixed SwiftFileIterator to return paths relative to the given directory.
* Clean up for FSFileBackend trailing slash handling.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108766
|
|
|
|
|
|
|
| |
* Removed TODO comment in SwiftFileBackend
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108750
|
|
|
|
|
|
|
| |
* Added i18n messages used by the new class.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108749
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108745
|
|
|
|
|
|
|
| |
* Added some class comments
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108744
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108743
|
|
|
|
|
|
|
|
|
| |
more similarly to the backends with real containers (e.g. everything else). Resolution to absolute paths is now deferred after resolveStoragePath(), using resolveToFSPath().
* Fixed whitespace in FSFileIterator.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108740
|
|
|
|
|
|
|
| |
intended for things that might really care.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108488
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108473
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108472
|
|
|
|
|
|
|
|
|
|
| |
option was used.
* Added missing prepare() call to File::maybeDoTransform().
* Improved documentation.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108471
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The suffix to strip was determined using realpath() but applied on
the given path. This could lead to errors when the path is made of
a symbolic link or use consecutives slashes.
Example on Mac OS:
$ php -a
php > print realpath( '/private///tmp' );
/private/tmp
php > print realpath( '///tmp///////' );
/private/tmp
php >
$
Fix FileBackendTest::testGetFileList test which failed with:
1) FileBackendTest::testGetFileList
Correct file listing (FSFileBackend).
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 0 => 'subdir1/test1.txt'
- 1 => 'subdir1/test2.txt'
- 2 => 'subdir2/subdir/sub/120-px-file.txt'
- 3 => 'subdir2/subdir/sub/test0.txt'
- 4 => 'subdir2/subdir/test1.txt'
- 5 => 'subdir2/subdir/test2.txt'
- 6 => 'subdir2/subdir/test3.txt'
- 7 => 'subdir2/subdir/test4.txt'
- 8 => 'subdir2/subdir/test5.txt'
- 9 => 'subdir2/test3.txt'
- 10 => 'subdir2/test4.txt'
- 11 => 'test1.txt'
- 12 => 'test2.txt'
- 13 => 'test3.txt'
+ 0 => '/subdir/sub/120-px-file.txt'
+ 1 => '/subdir/sub/test0.txt'
+ 2 => '/subdir/test1.txt'
+ 3 => '/subdir/test2.txt'
+ 4 => '/subdir/test3.txt'
+ 5 => '/subdir/test4.txt'
+ 6 => '/subdir/test5.txt'
+ 7 => '/test1.txt'
+ 8 => '/test2.txt'
+ 9 => '/test3.txt'
+ 10 => '/test4.txt'
+ 11 => 'xt'
+ 12 => 'xt'
+ 13 => 'xt'
)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108408
|
|
|
|
|
|
|
|
|
| |
FileBackendBase.
* Added some prepare()/clean() tests.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108377
|
|
|
|
|
|
|
|
| |
* Made 'success', 'successCount', and 'failCount' fields reflect the overall operation in FileBackendMultiWrite::doOperationsInternal(). This makes it match up with single-write backends.
* Made FileBackend::clearCache() part of the public API.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108369
|
|
|
|
|
|
|
|
|
|
| |
doOperations() as it's own separate operation. It does not mutate storage files like the others and having it in doOperations() broke FileBackendMultiWrite. This change also makes overriding doOperationsInternal() easier (suching as using a custom batch operation storage API).
* Added sanity check to FileBackendMultiWrite constructor.
* Moved FileBackend::create() function up a bit.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108355
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added getFileSize()/getFileStat() functions. Refactored some functions to use the stat function for better reuse and caching/consistency.
* Refactored streamFile() to allow for subclasses to avoid local file copying with less duplication. Also make last-modified check actually work since we always get the timestamp of the original file.
* Renamed 'ignoreErrors' parameter to 'force'.
In FileBackendMultiWrite:
* Simplified how read ops are done (use 'master' backend for consistency).
* Added consistency check to doOperationsInternal() to check if the files are synced.
* Various fixes after testing.
In StreamFile:
* Split out prepareForStream() function from stream() in StreamFile for code reuse.
In FileBackendTest:
* Properly cover FileBackendMultiWrite in tests.
* Various test improvements.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108353
|
|
|
|
|
|
|
| |
* Various documentation cleanups.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108304
|
|
|
|
|
|
|
| |
restrictive and breaks on default DB name value suggested by installer. Azure can use resolveContainerName() to enforce its extra restrictions. A new resolveWikiId() function was added to allow for it to mangle the wiki ID by translating underscores. Also restored previous size limit in isValidContainerName() since it makes sense to either go all the way lowest-common-denominator or not here (in this case not). Preserved "first char is a alphanumeric" check since it's pretty weird to have anything else.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108303
|