From 9fe2e8eb7e1e402a95a8528d4fce8b3f6e220fba Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 7 Mar 2019 15:12:33 -0800 Subject: [PATCH] objectcache: remove BagOStuff::modifySimpleRelayEvent() This was only there as part of EventRelayer use by WAN cache, which has since been removed. No other usage really makes sense. Change-Id: I201425bb88739dd8febbfbc3d24a15e6d3d88d9c --- RELEASE-NOTES-1.33 | 1 + includes/libs/objectcache/BagOStuff.php | 18 ------------------ includes/libs/objectcache/CachedBagOStuff.php | 4 ---- .../libs/objectcache/MemcachedBagOStuff.php | 8 -------- includes/libs/objectcache/RedisBagOStuff.php | 8 -------- 5 files changed, 1 insertion(+), 38 deletions(-) diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index b9331bc8de..0180763f7d 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -284,6 +284,7 @@ because of Phabricator reports. * (T217772) The 'wgAvailableSkins' mw.config key in JavaScript, was removed. * Language::markNoConversion, deprecated in 1.32, has been removed. Use LanguageConverter::markNoConversion instead. +* BagOStuff::modifySimpleRelayEvent() method has been removed. === Deprecations in 1.33 === * The configuration option $wgUseESI has been deprecated, and is expected diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index a3c020e98d..4002e63fe1 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -729,24 +729,6 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { $this->busyCallbacks[] = $workCallback; } - /** - * Modify a cache update operation array for EventRelayer::notify() - * - * This is used for relayed writes, e.g. for broadcasting a change - * to multiple data-centers. If the array contains a 'val' field - * then the command involves setting a key to that value. Note that - * for simplicity, 'val' is always a simple scalar value. This method - * is used to possibly serialize the value and add any cache-specific - * key/values needed for the relayer daemon (e.g. memcached flags). - * - * @param array $event - * @return array - * @since 1.26 - */ - public function modifySimpleRelayEvent( array $event ) { - return $event; - } - /** * @param string $text */ diff --git a/includes/libs/objectcache/CachedBagOStuff.php b/includes/libs/objectcache/CachedBagOStuff.php index 3927ed3004..25fcdb0e2c 100644 --- a/includes/libs/objectcache/CachedBagOStuff.php +++ b/includes/libs/objectcache/CachedBagOStuff.php @@ -117,9 +117,5 @@ class CachedBagOStuff extends HashBagOStuff { return $this->backend->clearLastError(); } - public function modifySimpleRelayEvent( array $event ) { - return $this->backend->modifySimpleRelayEvent( $event ); - } - // @codeCoverageIgnoreEnd } diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php b/includes/libs/objectcache/MemcachedBagOStuff.php index bf0da11725..47e04d0f03 100644 --- a/includes/libs/objectcache/MemcachedBagOStuff.php +++ b/includes/libs/objectcache/MemcachedBagOStuff.php @@ -181,12 +181,4 @@ class MemcachedBagOStuff extends BagOStuff { protected function debugLog( $text ) { $this->logger->debug( $text ); } - - public function modifySimpleRelayEvent( array $event ) { - if ( array_key_exists( 'val', $event ) ) { - $event['flg'] = 0; // data is not serialized nor gzipped (for memcached driver) - } - - return $event; - } } diff --git a/includes/libs/objectcache/RedisBagOStuff.php b/includes/libs/objectcache/RedisBagOStuff.php index a0febfc48d..3926604f30 100644 --- a/includes/libs/objectcache/RedisBagOStuff.php +++ b/includes/libs/objectcache/RedisBagOStuff.php @@ -317,14 +317,6 @@ class RedisBagOStuff extends BagOStuff { return $result; } - public function modifySimpleRelayEvent( array $event ) { - if ( array_key_exists( 'val', $event ) ) { - $event['val'] = serialize( $event['val'] ); // this class uses PHP serialization - } - - return $event; - } - /** * @param mixed $data * @return string -- 2.20.1