You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are trying to send a redis module command using the AsyncRedisCluster interface.
We are using the generic command interface AsyncRedisCluster::command(Input first, Input last, Callback &&cb).
Our redis module command format looks like module-name subcommand <key> ...args.
We discovered that the redis++ library uses the second argument as the key for the sharding.
In our case as it can be seen in the example command format, the key is the 3rd argument.
To Reproduce
This minimal code is without async and callbacks due to its simplicity, but the behavior is the same.
Yes, redis-plus-plus' generic interface uses the second command argument as key. In order to work around it, you can create an AsyncRedis object with AsyncRedisCluster, and send the command to it with this new AsyncRedis object:
auto r = async_redis_cluster.redis("key", false); // create it with a connection from the underlying connection pool
r.command<void>(raw_cmd.begin(), raw_cmd.end());
Describe the bug
We are trying to send a redis module command using the
AsyncRedisCluster
interface.We are using the generic command interface
AsyncRedisCluster::command(Input first, Input last, Callback &&cb)
.Our redis module command format looks like
module-name subcommand <key> ...args
.We discovered that the redis++ library uses the second argument as the key for the sharding.
In our case as it can be seen in the example command format, the key is the 3rd argument.
To Reproduce
This minimal code is without async and callbacks due to its simplicity, but the behavior is the same.
Expected behavior
We would like to be able to use the command interface so as to be able to send to db commands like:
And do the hashing based on the key.
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: