-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction logic testing tool / load testing tool #31
Comments
Stateright is more immediately easier to integrate into a Rust automated testing workflow, and their examples show how to do that. However its examples and focus is primarily on distributed systems testing, so teasing out how to do a good test of e.g. MVCC behaviour is something that would have to be learned. Jepsen is the gold standard for database / distributed systems correctness testing, and it is likely that there's more concrete examplars to follow in this regard for testing on a single-node system for transaction correctness. Basically need to take a look at existing DB jepsen tests that test serialization conflict, and work from there to adapt for Moor. However it has its own external dependencies, runs in Java, etc. and is much more complicated to set up. Maybe running in a docker container? (see https://github.com/jepsen-io/jepsen/blob/main/docker/README.md) |
#31 A program which runs a series of concurrent workloads of reading and appending to lists on a set of random properties, in a number of concurrent transactions. It then logs them into an "EDN" format file that the `elle` tool from `jepsen` can read and check for transactional isolation inconsistencies. With this we are able to prove whether or not `moor` enforces strict serializable isolation. At least in this (for now) limited use case. Using this tool I was able to test the conflict-retry logic under load, as well as find some bugs in it. Testing shows that with the fjall-db backend and for this list-append workload, moor behaves correctly with `serializable` isolation, but does not conform to elle's definition of `strict-serializable`
Ok so updating this, the above comments being very old and obsolete... I now have a separate (model-checker) tool which puts the whole system under concurrent load doing property updates to append values to lists on a few properties. It then outputs the read/append results to an EDN-format file that Jepsen's Using this I was able to prove that moor running with the fjall-db backend behaves properly with |
I would like a suite of tests to check for correctness of concurrent behaviour; linearizability, consistency, serialization conflicts, etc.
Still very vague in my mind, but probably a suite of Jepsen tests and/or Stateright (https://github.com/stateright/stateright).
Essentially, instantiating kernel + db with a predefined simple set of objects and then perform concurrent evaluations of mutations to provoke serialization conflicts, retries, and verify correct behaviour under concurrent load.
This will be essential in the short run run for a) finishing the transactional layer (retries on conflict) and b) making sure the Rocks etc layer works as hopes and in the medium/long run for swapping in alternative world state storage models.
The text was updated successfully, but these errors were encountered: