objectcache: remove BagOStuff::modifySimpleRelayEvent()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 7 Mar 2019 23:12:33 +0000 (15:12 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 8 Mar 2019 21:17:26 +0000 (13:17 -0800)
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
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/CachedBagOStuff.php
includes/libs/objectcache/MemcachedBagOStuff.php
includes/libs/objectcache/RedisBagOStuff.php

index b9331bc..0180763 100644 (file)
@@ -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
index a3c020e..4002e63 100644 (file)
@@ -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
         */
index 3927ed3..25fcdb0 100644 (file)
@@ -117,9 +117,5 @@ class CachedBagOStuff extends HashBagOStuff {
                return $this->backend->clearLastError();
        }
 
-       public function modifySimpleRelayEvent( array $event ) {
-               return $this->backend->modifySimpleRelayEvent( $event );
-       }
-
        // @codeCoverageIgnoreEnd
 }
index bf0da11..47e04d0 100644 (file)
@@ -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;
-       }
 }
index a0febfc..3926604 100644 (file)
@@ -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