Comments (2)
I think a good way to fix this will be to have the MULTI/EXEC list of commands get put inside a simple Lua script that we can generate when EXEC is called. The Lua script will just call redis.call
sequentially and build a list (Lua table) of responses. If we do this, I think will simplify a lot of the current code around transactions since in Scala we only ever deal with one command being run (EVAL/EVVALSHA).
What do you think? The other option is to rewrite the current transaction code to go from "send commands -> await all replies" to "send command -> await reply -> send command -> await reply -> etc".
There might be some overhead compiling/running the Lua script, but it will simplify the code a lot.
from curiodb.
I don't know much about Lua script, i will look at it later. In your second solution, your don't need to send all commands sequently, the problem is commands with multi key and some commands like dbsize executed by clientNode may conflict with other commands, but implementing this is more complicated.
And there are other problems about the transaction, i will post it later.
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
- 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
- MSETNX behaves wrong HOT 5
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.