mosquito icon indicating copy to clipboard operation
mosquito copied to clipboard

unknown command `lmove`

Open jwoertink opened this issue 11 months ago • 6 comments

Just upgraded to the latest Mosquito and after deploying, my workers all break with this error

Unhandled exception in spawn: ERR unknown command `lmove`, with args beginning with: `mosquito:waiting:event_save_worker`, `mosquito:pending:event_save_worker`, `RIGHT`, `LEFT`,  (Redis::Error)
  from /home/runner/work/joysticktv/joysticktv/lib/redis/src/parser.cr:54:9 in 'read'
  from /home/runner/work/joysticktv/joysticktv/lib/redis/src/connection.cr:406:7 in 'run'
  from /home/runner/work/_temp/crystal-1.10.1-true-undefined/share/crystal/src/fiber.cr:146:11 in 'run'
  from ???

Please include some details:

Crystal version: 1.10.1 Mosquito Shard version: 1.0.2 Redis: 0.7.1

jwoertink avatar Mar 12 '24 18:03 jwoertink

This is because of an out of date redis version. You should be able to update redis and resolve.

robacarp avatar Mar 12 '24 23:03 robacarp

Doesn't Mosquito lock to 0.7.x though?

https://github.com/mosquito-cr/mosquito/blob/703a90a71d22c5e0495633e0af1c0b5bbd606c26/shard.yml#L21

Or would I just add an override?

jwoertink avatar Mar 12 '24 23:03 jwoertink

Hmm...Something's amiss. I'm running the same stack as you are, but I don't get the error. From my shard.lock:

  mosquito:
    git: https://github.com/mosquito-cr/mosquito.git
    version: 1.0.2+git.commit.703a90a71d22c5e0495633e0af1c0b5bbd606c26

  redis:
    git: https://github.com/jgaskins/redis.git
    version: 0.7.1

The LMOVE command had an associated bug in the redis adapter, and the commit mentioned 0adfc34e53f061545c570c9362a010b903ecf429 was present going back to 0.7.0.

Can you post your shard.lock lines for mosquito and redis?

robacarp avatar Mar 13 '24 00:03 robacarp

  mosquito:
    git: https://github.com/mosquito-cr/mosquito.git
    version: 1.0.2

  redis:
    git: https://github.com/jgaskins/redis.git
    version: 0.7.1

This is what the shard.lock had.

jwoertink avatar Mar 13 '24 14:03 jwoertink

Looks like this is caused because we're using Redis 6.0.5 in production, and LMOVE didn't show up until 6.2. We will have to just upgrade.

jwoertink avatar Mar 13 '24 16:03 jwoertink

Since LMOVE was added merely to quit using a deprecated redis command, I think it makes sense to add a config option for this which can revert to the old behavior.

robacarp avatar Mar 20 '24 01:03 robacarp