Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/226441
Change subject: Don't double-serialize values for APC (part 1) ...................................................................... Don't double-serialize values for APC (part 1) The last time we had encountered APC errors related to serialization / unserialization was 2011. PHP's implementation has had many bugfixes since then, and HHVM's implementation is a complete rewrite. So let's stop working around alleged bugs. This is the first of two patches. In this patch, APCBagOStuff::get() is hacked to always return false (imitating a cache miss). This is so we can perform a rolling restart of the application servers. One we roll that out, we can update production to Iea8e1568b6e, which removes the hack. Change-Id: I4b2cf1715538aa3d9163787f43eb31984a380d35 --- M includes/libs/objectcache/APCBagOStuff.php 1 file changed, 2 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/226441/1 diff --git a/includes/libs/objectcache/APCBagOStuff.php b/includes/libs/objectcache/APCBagOStuff.php index eaf1155..3e9d79c 100644 --- a/includes/libs/objectcache/APCBagOStuff.php +++ b/includes/libs/objectcache/APCBagOStuff.php @@ -28,26 +28,14 @@ */ class APCBagOStuff extends BagOStuff { public function get( $key, &$casToken = null ) { - $val = apc_fetch( $key ); - + /* HACK! This should only be live long enough for us to restart HHVM. */ + $val = false; $casToken = $val; - - if ( is_string( $val ) ) { - if ( $this->isInteger( $val ) ) { - $val = intval( $val ); - } else { - $val = unserialize( $val ); - } - } return $val; } public function set( $key, $value, $exptime = 0 ) { - if ( !$this->isInteger( $value ) ) { - $value = serialize( $value ); - } - apc_store( $key, $value, $exptime ); return true; -- To view, visit https://gerrit.wikimedia.org/r/226441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b2cf1715538aa3d9163787f43eb31984a380d35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits