Skip to content

When redis-server is down, NotImplementedError is raisedΒ #10

@jeremyjung

Description

@jeremyjung

When redis-server goes down and a command is sent or client was waiting for a blocking pop, a NotImplementedError is raised.

Example stack trace:

        6: from /home/name/.gem/ruby/2.6.1/gems/async-1.15.2/lib/async/task.rb:199:in `block in make_fiber'
        5: from queue.rb:10:in `block in <main>'
        4: from /home/name/.gem/ruby/2.6.1/gems/async-redis-0.3.3/lib/async/redis/methods/keys.rb:37:in `exists'
        3: from /home/name/.gem/ruby/2.6.1/gems/async-redis-0.3.3/lib/async/redis/client.rb:104:in `call'
        2: from /home/name/.gem/ruby/2.6.1/gems/async-redis-0.3.3/lib/async/redis/pool.rb:51:in `acquire'
        1: from /home/name/.gem/ruby/2.6.1/gems/async-redis-0.3.3/lib/async/redis/client.rb:107:in `block in call'
/home/name/.gem/ruby/2.6.1/gems/async-redis-0.3.3/lib/async/redis/protocol/resp.rb:119:in `read_object': Implementation for token  missing (NotImplementedError)

Sample program to reproduce:

Async do
  client = Async::Redis::Client.new(Async::Redis.local_endpoint)
  _, command = client.blpop(10, "test")
end.wait
  1. Open redis-server
  2. Run sample application
  3. Close redis-server during blpop.

Ideally an error related to connection should be raised. For instance, a library specific CannotConnectError (Used in redis-rb gem) or lower level ECONNREFUSED

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions