-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
redisCluster->rawCommand() didn't work correctly #1006
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
Comments
Hey, When using Example: $rc = new RedisCluster(NULL, ['127.0.0.1:7000']);
$ret = $rc->rawCommand('mykey', 'zadd', 'mykey', 'nx', 1, 'foo');
var_dump($ret); So it uses the first argument above
I could be missing something though. π |
Hi michael, Thanks for the reply. I had tried to pass the cluster node info as 1st argument of rawCommand() on my previous test. Just recheck the phpredis source and find out the port part must be passed as LONG to make it work. One more thing to be noticed. The following is the strace result for SIGSEG, it seemed the rawCommand implement didn't handle "MOVED" response nicely.
|
Fixed SIGSEG, thanks @responder-tw |
Hi all,
My test environment
phpredis 2.2.8 + 5.4.45-0+deb7u5 on Debian 7 + redis 3.0.6 cluster
.I had tried to implement "ZADD NX" function by rawCommand(), but got an
"Unable to send command to the specified node" exception when work w/ redis cluster.
After some digging, I found it's caused by incorrect key slot.
The patch is as attached for your reference.
(sorry, I'm not familiar w/ the pull request workflow.)
Tested ok on my environment.
redisClusterRawCommandPatch.txt
The text was updated successfully, but these errors were encountered: