Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 88cdd3c

Browse filesBrowse files
bug #22924 [Cache] Dont use pipelining with RedisCluster (nicolas-grekas)
This PR was merged into the 3.2 branch. Discussion ---------- [Cache] Dont use pipelining with RedisCluster | Q | A | ------------- | --- | Branch? | 3.é | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22922 | License | MIT | Doc PR | - phpredis doesn't support pipelining with RedisCluster see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining and multiple operations (MSET/MGET) work but only "per-shard". We have to fetch keys one by one for now at least. Commits ------- eb93ac9 [Cache] Dont use pipelining with RedisCluster
2 parents e37455f + eb93ac9 commit 88cdd3c
Copy full SHA for 88cdd3c

File tree

1 file changed

+8
-0
lines changed
Filter options

1 file changed

+8
-0
lines changed

‎src/Symfony/Component/Cache/Adapter/RedisAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/RedisAdapter.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ private function pipeline(\Closure $generator)
303303
foreach ($results as $k => list($h, $c)) {
304304
$results[$k] = $connections[$h][$c];
305305
}
306+
} elseif ($this->redis instanceof \RedisCluster) {
307+
// phpredis doesn't support pipelining with RedisCluster
308+
// see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining
309+
$result = array();
310+
foreach ($generator() as $command => $args) {
311+
$ids[] = $args[0];
312+
$result[] = call_user_func_array(array($this->redis, $command), $args);
313+
}
306314
} else {
307315
$this->redis->multi(\Redis::PIPELINE);
308316
foreach ($generator() as $command => $args) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.