Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#206·disque

QLEN inconsistent results

Author: dolzenkoCreated Dec 7, 2017Updated Mar 1, 2018

Given the cluster of 3 nodes, shouldn't the QLEN return the same results regardless the node being asked? In my tests only original node returns proper queue length, but GETJOB on different node still works properly

$ redis-cli -h eu1-queue-3 -p 7712 addjob testqueue testjob 1000
D-54bdf6f9-2qZjI4HgYKs8vP0ZWSeAANbK-05a1

$ redis-cli -h eu1-queue-1 -p 7712 qlen testqueue
(integer) 0 # WHY?
$ redis-cli -h eu1-queue-2 -p 7712 qlen testqueue
(integer) 0
$ redis-cli -h eu1-queue-3 -p 7712 qlen testqueue
(integer) 1

$ redis-cli -h eu1-queue-1 -p 7712 getjob from testqueue
1) 1) "testqueue"
   2) "D-54bdf6f9-2qZjI4HgYKs8vP0ZWSeAANbK-05a1"
   3) "testjob"

Source: antirez/disque

View original on GitHubView discussion on GitHub