-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Description
Hi,
ERROR Description
I use a LUA script that in essence does the following: The LUA function gets passed mutliple key-value pairs and stores them in different sets (key identifies the set, value gets added to set). Executing the LUA script I have the problem the keys so live on different vnodes, resulting in error messages like:
- MOVED 13657 127.0.0.1:6004
- Resending to port 6004: MOVED 12104 127.0.0.1:6003
Problem is that the input for the LUA function is spread over multiple cluster nodes and if the order is changed one or the other key will fail for sure.
Running Redis 2.9.9
Discussion
It makes sense from a dumb client perspective, but shouldn't the LUA scripting have a smart client for making it useful and versatile? Or at least a LUA method making it able to access the vnodes cluster hints.
Solving the issue on the client side would be awkward one way or the other:
- Sorting by buckets into lists and send those to the node (too big List of Lists)
- Sorting by nodes (additional logic neeced if one node is split into two nodes to refragment the cached list once again)
There might be ways around it in my scenario, but the issue IS valid for many use cases, where you don't know inside your script where the data lives (if value1 from key1 will be the key of another item, you're screwed!).
Testing Proposal
If there's something planned, let me know as I'm willing to test any new GIT version with my use case as I have some billions of rows of data in my application.