Commit graph

16 commits

Author SHA1 Message Date
Reedy
11cc2d6993 Consistently use @deprecated since rather @deprecated
Change-Id: I301786f35cd6eb9c63fb72e0b64cffa9efd7b86b
2022-03-06 02:55:54 +00:00
Reedy
86934b2fa8 Replace some more usages of Wikimedia\(suppress|restore)Warnings()
Change-Id: I2eb133a9e32116cd155f59086245bc4d15ecbfcc
2022-02-24 20:27:46 +00:00
Tim Starling
54c735354f Stop using is_resource() where possible
* Enforce the ban on is_resource in phpcs
* In OrderedStreamingForkController, the comment was incorrect. I
  confirmed using a small test script that if the child closes one end
  of a socket pair, the other end will still be open, and is_resource()
  will still return true, and fclose() will not fail. The issue was
  introduced in c82d30d19c, it was not present in the
  CirrusSearch copy of the class.
* Allow is_resource() for debug logging.
* Allow is_resource() for parameter validation where a stream may be
  passed to a function, since there is no alternative.

Bug: T260735
Change-Id: I59a752f7bb4b043ddfb2434b52a02f9221bf54db
2022-01-26 10:03:23 +11:00
jenkins-bot
c9207b770b Merge "MemcachedClient: Add support for ipv6" 2022-01-10 20:09:30 +00:00
Siddharth VP
b77dd0640c Fix typos in comments (M)
Change-Id: I5ab88a01ba3e5ea2aae853bb6f06492fbc84ceb5
2022-01-09 23:00:20 +05:30
Paladox
d9eeff98ef MemcachedClient: Add support for ipv6
Bug: T298564
Change-Id: Iaa119f5e62816d1605c20eae48427f23f50809a8
2022-01-04 23:55:06 +00:00
Aaron Schulz
12946b629a objectcache: improve error status codes in MemcachedPeclBagOStuff
Use ERR_UNREACHABLE and ERR_NO_RESPONSE in various error cases,
rather than just using ERR_UNEXPECTED.

Bug: T252951
Change-Id: I5c15362132b8c80aad973520e0addc474bb38c22
2021-12-01 04:33:17 +00:00
Aaron Schulz
59b002b866 objectcache: Remove unused QOS_LOCALITY_* constants
Follow-up to 7e1216370, which removed ATTR_LOCALITY.

Change-Id: I9885f53f0058e06056f76249a447c4bb3c96ad2f
2021-10-04 18:45:58 +00:00
Aaron Schulz
7e12163708 objectcache: simplify BagOStuff::ATTR_* flags and set them for backends
* Remove unused ATTR_SYNCWRITES/QOS_SYNCWRITES_* constants
* Remove unused ATTR_LOCALITY/QOS_LOCALITY_* constants

Bug: T279977
Change-Id: I5ada228fbd504f8e94833df8a8414ed8da0bce4b
2021-08-31 11:23:28 -07:00
Martin Urbanec
411cea4d60 Fix a typo in ExpirationAwareness (Idom => Idiom)
Change-Id: Ie181ec5d6dcd917f509af74e3af4717142a66e8d
2021-02-18 03:10:21 +01:00
Reedy
5eab9653e0 MemcachedClient: Cast Resource to integer
Bug: T269178
Change-Id: I9227528ceb0235b394c8f42621869cffe15ccba8
2020-12-15 12:43:16 +00:00
Thiemo Kreuz
20b2c5000d Make use of array deconstruction directly in foreach, if possible
Deconstructing non-sparse, numerically indexed arrays directly in
foreach (a.k.a. using the list() syntax in foreach) is possible since
PHP 5.5.

The possibility to use string array keys as well as non-sequential
numeric keys in array deconstruction was added in PHP 7.1.

Change-Id: I56a48552a45f61cedc291b306cad8548fc70d485
2020-11-12 18:38:06 +00:00
daniel
d75b45ee2f objectcache: Add QoS flags to HashBagOStuff
Change-Id: I571c860ef9dd32a1eb374d59738f6e9e74b19fc2
2020-09-17 01:25:29 +00:00
Aaron Schulz
7523716ebd objectcache: only use memcached "gets" when tokens are needed
This saves a few bytes in the response size and make it easy
for memcached proxies to distinguish key fetches that are part
of check-and-set cycles from those that are not.

MediumSpecificBagOStuff now requires PASS_BY_REF to fetch CAS
tokens. BagOStuff::merge() and WinCacheBagOStuff::doCas() are
the only callers that need this mode.

Bug: T257003
Change-Id: If91963f58adc4cda94f6d634ee0252a479a0fc5e
2020-07-15 00:16:46 +00:00
Aaron Schulz
69950da666 objectcache: split out StorageAwareness/ExpirationAwareness from IExpiringStore
Add more detailed QOS_* constants while at it

Bug: T236412
Change-Id: Ia862c5111a3daf10a34fc78163301629228efa6b
2020-03-02 20:01:24 +00:00
Aaron Schulz
44e2ab3560 objectcache: move MemcachedClient class to /utils subdir
Change-Id: I2774d3e7a3c96ef691106b21908a42bfbbf25956
2019-08-21 16:17:20 -07:00