neural-redis icon indicating copy to clipboard operation
neural-redis copied to clipboard

Unexpected behaviour with NR.OBSERVE in multi

Open stockholmux opened this issue 8 years ago • 3 comments

NR.OBSERVE doesn't reject the wrong number of arguments when in a MULTI. Here I'm running NR.OBSERVE with no arguments.

> MULTI
OK
> NR.OBSERVE
QUEUED
> NR.OBSERVE
QUEUED
> EXEC
1) (error) ERR wrong number of arguments for 'nr.observe' command
2) (error) ERR wrong number of arguments for 'nr.observe' command

I would expect that if you run NR.OBSERVE you would receive an immediate error and/or trigger an EXECABORT when running the EXEC command.

stockholmux avatar Nov 22 '16 19:11 stockholmux

This is actually an issue of modules API itself because this is the behavior of any module command. There's also a difference in how COMMAND GETKEYS responds for core and module commands if passed w/ incorrect arguments.

itamarhaber avatar Nov 22 '16 20:11 itamarhaber

@itamarhaber So, am I reading that this is the expected behaviour? Or will a fix to the modules API make module commands behave the same way as the in-built commands?

stockholmux avatar Nov 23 '16 21:11 stockholmux

The latter, but there isn't a relevant open issue - perhaps you should migrate this issue to the Redis repository

itamarhaber avatar Nov 23 '16 22:11 itamarhaber