* This can avoid some stale write race conditions
* Made use of this option in a few key places
* HOLDOFF_TTL was also bumped
Change-Id: I83505a59cce0119e456191c3100f7d97bc86bdbf
* They now issue the delete() write before COMMIT of
the relevant DB (or immediately if no trx is active)
* This can avoid some stale write race conditions
* Updated the WAN cache delete() docs
Change-Id: Id54887976051120b76528070d5f2ceb357d57897
* Added a "storageLayout" flag to LocalRepo config (supports "sha1")
* Added a simple migration script to copy files the SHA1 paths
* Currently works with img_auth.php + thumb_handler.php for URLs
* Added visibility to some LocalFile methods
* Simple tests for the wrapper class.
Co-Authored-By: Gilles Dubuc <gdubuc@wikimedia.org>
Change-Id: Iad46ad669c8ae3c02d10da10c3f7a16fe161663f
Bug: T1210
Graphite expects name components to be dot-separated, so our habit of using
dashes doesn't really make sense. Change metric names to be more compatible
with Graphite, except the job queue's, since that will require a gdash
dashboard definition migration.
Change-Id: I77d0ff7606a8fc88434e4352d23415a9a8f4725a
Most are already, but some had differnet names. In PHP 5.4+ this is
redundant as they inherit automatically, but we need these for PHP 5.3
compatibility. Settle on "$that" to make these easier to find.
Change-Id: I0b68b2c550fde9c2da53d844421e34b8df0c42ed
Mysqli is returning SELECTed ints as strings rather than as ints, I'm
guessing to avoid problems with 64-bit int types on 32-bit systems. PHP
mostly doesn't care, but it causes API JSON output to have strings
instead of ints all over the place.
This also fixes ForeignAPIFile::getUser( 'id' ) returning the user
*name*.
Bug: T98276
Change-Id: Ie6591d72b3ac40172f8176a8ca8b6fad8e9275a5
* This just purges an unused key as OldLocalFile::getCacheKey
simply returns false (rather than a key with "oldfile" in it)
Change-Id: Ic7dda9bf192803a75eaa9bd3bb5a145ad1409dd2
This used to happen automatically via markVolatile() but that was
removed in I808c3a6, which caused cache updates after move/delete
to retain outdated information from slaves.
Bug: T93009
Bug: T88506
Change-Id: Ie4a6c5fbecec9b38ad3ff45fbc22c5d74d66601c
Fetch page_touched timestamp of file description page via a DB query
(possibly to a foreign DB).
Not sure about the performance implications; could add a memcached
layer on top, but the same DB lookup was already done for local
files.
Bug: T88648
Change-Id: I891c806aab235ff2c0e73c98b06b64fbe78e1517
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
The edit summary for the null revision on upload overwrite was in the
user language and not in content language
Possible a regression from Idf281898d8a5a023a0b9ce3bc90b3ca55c1a6376
Bug: T72293
Change-Id: Ie70a3874e170b3849e91265e0c9c61da838f2d20
* Often users restore a batch of many files with similar names.
This fails due to gap locking on non-existing rows which tangles up
unrelated actions. Avoid that locking for the common case.
* This changes the return value of LocalFile::lock() from a useless
one (due to the exception) to one that conveys some useful information.
The method is fairly internal in any case.
Change-Id: Idb86367cf45b731d4b2a67b1813a660bc0e7a84f
* Previously, the file existence checks would not distinguish an answer
in the negative from a non-answer. This was a long-standing problem.
This avoids moving DB entries without moving the files (unless the
partition happens in the middle of the moves of course).
* Optimized fileExistsBatch() to do concurrent stats if possible.
bug: 40927
bug: 69312
Change-Id: I9132fd5591bb7a3d5852f17514dcf51a3d8b7812
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I41a84e8e1dec39170aa655250325ffc485eaeaef
* This avoids excess contention where inserts of rows for
similarly named files get blocked. This often would effect
users of UploadWizard or any bot doing mass uploads.
Change-Id: Ie7a328f7d4f03aa249770804417347a50356ea42
* If a move is blocked by a re-upload and the TRX started outside of
LocalFile::lock, then the move did not see the new row in the oldimage
table and so it will not move that version of the file in storage. Use
the latest DB data to avoid that.
Change-Id: I7ec46941170293c96b99a449cb396517108e8b3d
The img_metadata field was not being decoded from bytea into text.
This change to core fixes the reported problem with PdfHandler against
1.22.6, origin/REL1_23 and git head.
Bug: 59147
Change-Id: I285a317a57a29713af1f7f630b340278bd5400da
This avoids the use of $wgUser in Revision constructor and makes the
dependency on the global visible.
Change-Id: Ib67bd706a3c4ef081f475406e9aa1094c42222ef