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

redis-clustr monitor mode crashes #21

Open
geogeim opened this issue Apr 11, 2017 · 1 comment
Open

redis-clustr monitor mode crashes #21

geogeim opened this issue Apr 11, 2017 · 1 comment

Comments

@geogeim
Copy link

geogeim commented Apr 11, 2017

  redisPub.monitor();
  redisPub.on("monitor", function (time, args, raw_reply) {
    log.debug("REDIS", args.join(" "));
  });

Unhandled exception has occurred: Error
Error: no key for command: monitor
at d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\src\RedisClustr.js:362:25
at module.exports.RedisClustr.parseArgs (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\src\RedisClustr.js:345:11)
at d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\src\RedisClustr.js:333:12
at runCbs (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\src\RedisClustr.js:170:7)
at Command.callback (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\src\RedisClustr.js:254:7)
at normal_reply (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\node_modules\redis\index.js:721:21)
at RedisClient.return_reply (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\node_modules\redis\index.js:819:9)
at JavascriptRedisParser.returnReply (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\node_modules\redis\index.js:192:18)
at JavascriptRedisParser.execute (d:\Work\ninesix\webtriggers\session\node_modules\redis-parser\lib\parser.js:538:12)
at Socket. (d:\Work\ninesix\webtriggers\session\node_modules\redis-clustr\node_modules\redis\index.js:274:27)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:559:20)

@jbt
Copy link
Member

jbt commented Apr 11, 2017

Ah yes MONITOR is one command we didn't think about. I guess the logical solution for this is to issue a MONITOR to every master instance in the cluster and then combine the triggered monitor events.

jbt added a commit that referenced this issue Mar 21, 2018
... rather than checking interval===0 which isn't true for commands with
movable keys (e.g. zunionstore).

For keyless commands we just address a random node, which was always the
intention, but this actually makes that work. Fixes #25

For those movable-keys commands we just go by the first key given. And
if redis complains then it'll fail with a redis error. Fixes #26.

This also addresses #21 inasmuch as the command shouldn't error any more.
However, MONITOR should perhaps get special treatment rather than just
addressing a random node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants