3 ms·
The best tool out there is probably jepsen.io but it requires domain knowledge to properly operate it. The guy behind it is a beast! Anyway, I wrote lots of un
by romange 4y ago
The best tool out there is probably jepsen.io
but it requires domain knowledge to properly operate it. The guy behind it is a beast!
Anyway, I wrote lots of unit tests to cover those atomicity issues. You can also write a custom python/nodejs/golang/... scripts that simultenusly write and read from the same multiple keys in such way that some invariant is preserved. For example,
"mset x {i}, y {i}" for random `i` and in parallel do "mget x y" and to check that the response returns same values. You can also test this for other families using transactions like "MULTI; lpush x ${foo}; lpush y ${foo}; EXEC" .. and then similarly test that x and y have exactly the same lists.
- anitil 4y agoAh thanks I had heard of and then forgotten about jepsen. I had considered what you described but I thought there might be a more targeted approach where you can specify your invariants (like "x can only be in one of two states" or "pushing alway increases the length of a list and popping always reduces it if it's non-empty") and get the tool to try to break them. I wonder if there could be a tool that instruments in the same way that afl does to try to detect races or inconsistent states.