Comments (2)
I agree that this should be consistent. Thanks for noticing.
The reason it is not right now is that it shares timeout code with the regular
blocking pops, which in fact do emit a null multi bulk on timeout. In my
opinion this is only cosmetic, since both the null bulk and null multi bulk
means some kind of null value (unlike the empty bulk/string vs the empty multi
bulk/array). Does the client you use return different objects for these two
types of null replies?
Original comment by [email protected]
on 30 Aug 2011 at 3:57
- Changed state: Accepted
from redis.
I've only used the redis-rb client before, which does return nil for any
null reply.
The reason I'm noticing the issue now is that I'm writing my own client in a
statically typed language, Haskell. Because of type inference and a mapping
that I define from Redis reply types to common Haskell types, if I declare
that my client's `brpoplpush` function returns the common type `IO (Maybe
String)` (i.e., a string that can be null), then it can be inferred at
compile time that a bulk reply should be read from the socket.
I worked around the BRPOPLPUSH issue by changing my type mapping so that `IO
(Maybe String)` can be coerced from either a bulk reply or a null multi-bulk
reply. However, having a guaranteed reply type for each command is a nice
property, and I figured that it would be worth pushing for if BRPOPLPUSH is
the only exception.
Original comment by [email protected]
on 30 Aug 2011 at 8:54
from redis.
Related Issues (20)
- A 8G .aof file lead redis loading so slowly... HOT 3
- The command "config get databases" does not return
- Allow SORT Command to STORE results as sorted set HOT 1
- Even after flushall maxmemory shows the previous max value. HOT 10
- [FEATURE REQUEST]HMSETX/HSETX HOT 3
- BRPOPLPUSH and a single LPUSH with several items doesn't work well together HOT 2
- Suggestion on either using AOF or Save setting HOT 4
- [FEATURE REQUEST]maxmemory-policy HOT 4
- The issue about the special scenario in redis-2.2.12 HOT 5
- setex silent data loss when using unix time for expiration value HOT 4
- Need Git Tag for 2.2.13 HOT 1
- DBNUM Command HOT 4
- EXPIREAT make test fails
- Hello, antirez. At what time release b-tree version disk store? HOT 1
- make test error CentOS HOT 2
- Could not connect to Redis at 127.0.0.1:6379: Connection refused HOT 1
- configure bind two interface
- minor change (call to id instead of whoami) in install script HOT 1
- /
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis.