From 6c45ff18bc4717e1854f50aa95ac416b920f329d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 23 Sep 2014 17:26:00 -0700 Subject: [PATCH] Fixed bug in BloomCacheRedis::getConnection * The array keys need to be re-indexed to avoid picking a deleted one Change-Id: I3c22674a0194597598d66179bb5e3625da1dd38c --- includes/cache/bloom/BloomCacheRedis.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/cache/bloom/BloomCacheRedis.php b/includes/cache/bloom/BloomCacheRedis.php index 212e5e8ba9..583556fdd4 100644 --- a/includes/cache/bloom/BloomCacheRedis.php +++ b/includes/cache/bloom/BloomCacheRedis.php @@ -328,7 +328,7 @@ LUA; } /** - * $param string $to (master/slave) + * @param string $to (master/slave) * @return RedisConnRef|bool Returns false on failure */ protected function getConnection( $to ) { @@ -354,6 +354,7 @@ LUA; return $conn; } unset( $servers[$index] ); // skip next time + $servers = array_values( $servers ); // reindex } } -- 2.20.1