Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit606df24

Browse files
bug#61234 [Cache] RedisTrait::doFetch should use pipeline with GET's instead of MGET for Relay\Cluster (dorrogeray)
This PR was submitted for the 7.3 branch but it was merged into the 6.4 branch instead.Discussion----------[Cache] RedisTrait::doFetch should use pipeline with GET's instead of MGET for Relay\Cluster| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues | Fix #...| License | MIT🛠️ `Relay\Cluster` should be expected to operate with >1 master nodes, and therefore its not safe to use `mget` when fetching the ids in `RedisTrait::doFetch(array $ids)` as they are not guaranteed to be on a same hash slot.This change makes `doFetch` use pipeline with `GET` commands when `$this->redis instanceof RelayCluster`Commits-------30a2ca0 [cache] RedisTrait::doFetch should use pipeline instead of mget for Relay\Cluster
2 parentsd157aa7 +30a2ca0 commit606df24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Cache/Traits/RedisTrait.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ protected function doFetch(array $ids): iterable
434434

435435
$result = [];
436436

437-
if ($this->redisinstanceof \Predis\ClientInterface && ($this->redis->getConnection()instanceof ClusterInterface ||$this->redis->getConnection()instanceof Predis2ClusterInterface)) {
437+
if (($this->redisinstanceof \Predis\ClientInterface && ($this->redis->getConnection()instanceof ClusterInterface ||$this->redis->getConnection()instanceof Predis2ClusterInterface)) ||$this->redisinstanceof RelayCluster) {
438438
$values =$this->pipeline(function ()use ($ids) {
439439
foreach ($idsas$id) {
440440
yield'get' => [$id];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp