Partial deletion percentage progess was computed using
$remainingSeconds. This is incorrect since $remainingSeconds
is going to *decrease* ( instead of increase ) while the
process continues.
The correct implementation uses 'processed seconds' instead.
Change-Id: Ic745f6e8375a85da543de36703fad6d31f62ea90
Avoid an unnecessary serialize() call on get() requests, which makes it
faster and also happens to work around a nasty crash bug which is
causing lots of segfaults right now.
CAS semantics should be the same, if the caller handles a CAS token in
an opaque way and does not assume it is a string. I could only find one
caller of cas() in core and WMF deployed extensions, and that is
BagOStuff::mergeViaCas(), which does correctly handle CAS tokens of any
type.
Bug: 71724
Change-Id: I0b0b5f0157c005ec7f76210dfb8576c056314733
- Added space after reserved words: function, foreach, if
- Combined 'else if' into elseif
- Added braces to one-line statements
- Added spaces after comma, before parentheses
Change-Id: Ie5bbf680d6fbe0f0872dab2700c16b1394906a72
Fixes "Fatal error: Argument 4 passed to Memcached::cas() must be an
instance of int, float given".
Change-Id: Ibf1ea638ec1a4dcf009cdaea8aa66008c74ff30b
- 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: I8ebfbcea0e2ae2670553822acedde49c1aa7e98d
Database::select() can return false, so we should check for it before
attempting to iterate on the result or to call methods on it.
Change-Id: I0862493305e5b2784422e0e94b3e62e734267795
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif
Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
* Callers still sees some decent time ordering since writes block
until committed. This will not blindly flush transactions though.
* Basically reverts 59e8032
Change-Id: Ib9a91ac023f8e3fafb0bf0eef9dca6e31b867be9
* This avoids breaking the main transaction in finishWrite().
* Also removed an unused variable in SqlBagOStuff.
Change-Id: Ia330ac362b080c1338616d95b793032c4752dc23
* This method is currently hit when bots use the maxlag API parameter
* Also added a $fallback param to ObjectCache::newAccelerator so code
does not have to keep reinventing that logic.
Change-Id: I45bf1085301c5cf69b29b494a146c6a067534581
It does not work with unserialize because RedisBagOStuff->unserialize
expects either strings of digits, or serialized strings. A plain integer
is neither.
incr docs were incorrect, so fix and expand by copying from parent class.
Change-Id: Ifc9c7a36f221b251ceea0d9a79ae6c3ce5753dd4
SqlBagOStuff::getMulti currently returns an array with false values for missed
cache keys.
Default BagOStuff::getMulti (and other specific implementations like memcached),
however, just omit missed values.
e.g.:
$cache->getMulti( array( 'goodkey' 'badkey' ) );
should return
array( 'goodkey' => 'value' );
instead of
array( 'goodkey' => 'value', 'badkey' => false );
Bug: 65637
Change-Id: Ib2de06a0f76421094707f7ad4218346087f4dc55
Includes implementions for Redis, Sql and MemcachedPecl,
other types will fallback to using $this->set repeatedly.
Change-Id: I0924a197b28ee69e883128ccd672343e5c041929
* This can limit how many workers work on a given file at once,
regardless of which specific thumbnail parameters are requested.
* Also added a BagOStuff::incrWithInit() method per DRY.
* Tweaked the register_shutdown_function() callback to avoid
File/MediaTransformOutput references, since they may involve
TempFSFile objects.
Change-Id: Ic01461cb974ab23b179ac3b60cf6de12e36360f6
Changed closure to capital word Closure in doc and type hint,
also changed callback in docs to callable
Change-Id: I52c8e8f13d38a837052101c38b9986be780ca057
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I86fd10e3f2d4bb80e7432533038d124693acfb3c
Variants included 'in <version>', 'as of <version>' and just the
version number.
Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.
Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat
Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
* Almost nothing actually uses this (one extension)
as it doesn't really solve race conditions like merge().
* Removed subclassed versions too.
Change-Id: I4d4123afcc0576a90a3cbf1e4e6daff7ebce39c3