Comments (5)
The idea with using broadcast is that it optimizes for a large number of keys. If we didn't use broadcast, we would have to run EXISTS
for every individual key, which would mean num messages == num keys
. Instead we broadcast all keys to all KeyNodes - so num messages == num keynodes
. Since each KeyNode then gets all keys, some which don't map to it, they should just return false values in their responses for each of the keys that don't map to them, which is fine - so long as we get back true values for the keys that do exist, from the KeyNodes they belong to.
Having said all that, I can see the bug, but I don't think it's due to using broadcast, which is the intention here - need to keep on digging, let's see who finds it first.
Also yes, we definitely need tests! I wonder if we can somehow leverage an existing set of tests for Redis? I tried using the TCL tests for Redis itself, but I couldn't get them to run against an external server, and they're probably too exhaustive anyway. Can you think of any other spots we mind find a good set of general Redis tests?
from curiodb.
Ok I found the bug - it was as simple as the wrong method name being overridden in AggregateMSetNX
- it should have been broadcastArgs
instead of keys
. Basically if you study AggregateBroadcast
(which AggregateMSetNX
eventually extends), you'll see it takes over the keys
method with an integer range (one per KeyNode
, since it's communicating with all of them), and then uses its own broadcastArgs
to implement command args (or keys).
I also updated the comments to try and explain this more clearly. Thanks again for the report! Looking forward to the next bug. :-)
from curiodb.
Fixed in 3a53d78
from curiodb.
What about tests for a java or scala redis client?
from curiodb.
Great idea
On 10/07/2015 12:32 PM, "tramchamploo" [email protected] wrote:
What about tests for a java or scala redis client?
—
Reply to this email directly or view it on GitHub
#6 (comment).
from curiodb.
Related Issues (11)
- Why SETNX always return true?
- Scala 2.11 HOT 1
- NOT recover its value from disk after "sleep-after = 10000" HOT 4
- Awesome HOT 1
- commands in transaction executed not sequently HOT 2
- lost update in transactions HOT 2
- var + mutable state inside actors HOT 1
- 127.0.0.1 HOT 1
- publish on maven central
- What is a .hgignore file. It doesn't work under my fork. 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 curiodb.