jenkins-bot has submitted this change and it was merged. Change subject: Added RedisBagOStuff FIXME comments ......................................................................
Added RedisBagOStuff FIXME comments Change-Id: I6f4f85166584439a38d632356f3ed95e4fd4fd6f --- M includes/objectcache/RedisBagOStuff.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index 9d5d0ef..ed0aaa2 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -264,8 +264,6 @@ return $result; } - - public function add( $key, $value, $expiry = 0 ) { list( $server, $conn ) = $this->getConnection( $key ); @@ -277,6 +275,7 @@ if ( $expiry ) { $conn->multi(); $conn->setnx( $key, $this->serialize( $value ) ); + // @FIXME: this always bumps the TTL; use Redis 2.8 or Lua $conn->expire( $key, $expiry ); $result = ( $conn->exec() == array( true, true ) ); } else { @@ -313,6 +312,7 @@ return null; } try { + // @FIXME: on races, the key may have a 0 TTL $result = $conn->incrBy( $key, $value ); } catch ( RedisException $e ) { $result = false; -- To view, visit https://gerrit.wikimedia.org/r/211307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f4f85166584439a38d632356f3ed95e4fd4fd6f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Gilles <gdu...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits