Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpRedisConnection function zadd is not working for native redis cluster. #30473

Closed
kojima-akira-sz opened this issue Oct 31, 2019 · 4 comments
Closed

Comments

@kojima-akira-sz
Copy link

  • Lumen Version: v6.2.0
    • illuminate/redis Version: v6.4.1
  • PHP Version: 7.2.21
  • phpredis Version: 5.0.2

Description:

PhpRedisConnection function zadd is not working for native redis cluster.

Arguments of Phpredis function rawCommand for redis cluster is defferent.

When using rawCommand with RedisCluster you pass the key or a host/port combination as the initial argument, which tells RedisCluster where to deliver the query
phpredis/phpredis#1006

What about using "command" instead of "executeRaw"?

return $this->executeRaw(array_merge(['zadd', $key], $dictionary));

Similarly for "exists".

Steps To Reproduce:

@driesvints
Copy link
Member

Hmm, I'm wondering if there's a specific reason why we use executeRaw for these commands...

@kojima-akira-sz
Copy link
Author

kojima-akira-sz commented Nov 5, 2019

Thank you for your reply.

My code is as flollows.

$redis->zadd("test-zadd2", 10, "member");
$results = $redis->zrange("test-zadd", 0, -1);

But $results is empty.

@baronliu
Copy link

baronliu commented Nov 12, 2019

I have the same question . I use Illuminate\Redis . When i use "exists" command . the result is null .

same as #21371

@themsaid
Copy link
Member

themsaid commented Mar 8, 2020

fixed in #31838

@themsaid themsaid closed this as completed Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants