Comments (5)
The outermost Option is for the situation when we get an error reply from Redis server. Please have a look at http://redis.io/topics/protocol.
from scala-redis.
Yep! I should have read Protocol specification before. Sorry!
Now everything clear to me.
from scala-redis.
I've tried to execute "smembers" on key that is not a Set and get Exception: ERR Operation against a key holding the wrong kind of value.
Now I am really confused, because You told that:
The outermost Option is for the situation when we get an error reply from Redis server.
But in fact You fire the exception.
Can You explain this to me, please?
from scala-redis.
In Redis protocol, some of the APIs return a Multi Bulk Protocol, which is documented in http://redis.io/topics/protocol. If you go towards the end of this document, you will see a discussion on Null Multi Bulk Reply. It says ..
Also the concept of Null Multi Bulk Reply exists.
For instance when the BLPOP command times out, it returns a Null Multi Bulk Reply, that has a count of -1 as in the following example:
C: BLPOP key 1
S: *-1\r\n
Note here redis returns -1 after the MULTI (*). In such cases the client returns a None. The Redis protocol documentation contains this example with BLPOP. But there can be scenarios with other multi-bulk replies where -1 is returned after a MULTI. Hence for safety I have made this distinction.
from scala-redis.
Thank You!
from scala-redis.
Related Issues (20)
- incorrect tag name on GitHub. s/v3.3.0/v3.30/ HOT 1
- Add support for variadic EXISTS
- How to create parser from object?
- How to use SSL Context to connect to Redis instance on AWS Elasticache with Encryption In-Transit enabled HOT 1
- Specify TTL for a key before pushing to Redis HOT 1
- Cannot find method "setCreated" in java.net.Socket. Unsupported JVM?
- Getting java.lang.Exception: Protocol error: Got (+,[B@38466868) as initial reply byte while pushing to redis quite frequently HOT 3
- Update: Missing stream commands XINFO, XADD, XTRIM, XDEL, XRANGE, XREVRANGE, XLEN, XREAD, XGROUP, XREADGROUP. XACK, XCLAIM, XAUTOCLAIM, XPENDING HOT 4
- Is server-assisted client side caching supported?
- Akka Dispatcher issue with scala redis
- How to add password to RedisClientPool? HOT 5
- "Exception: ERR wrong number of arguments f or 'expire' command" occurs when attempting to expire a key that contains spaces. HOT 11
- QUESTION - should `RedisClient` be shared or used as a singleton? HOT 3
- RedisClient in BATCH mode (for batchedPipeline) errors when sending commands to password-protected redis servers (initial AUTH command not sent) HOT 1
- can you support sentinel HOT 4
- Rate limit support
- Added LMOVE and BLMOVE but cannot test, blocked on PR
- Using with memcached redis protocol times out
- Read from lowest latency using AWS Elasticache Global datastore?
- Protocol errors while talking to Redis in Amazon ElasticCache 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 scala-redis.