datafuselabs / openraft

rust raft with improvements
Apache License 2.0
1.36k stars 150 forks source link

jepsen tests #475

Open Licenser opened 2 years ago

Licenser commented 2 years ago

Hi,

so I've started pulling in open raft into tremor as part of the upcoming work for clustering. I used the rocksdb example as a baseline, made some changes to make the API work a bit smoother, and added a basic jepsen test.

Jepsen is a bit tricky in that it requires docker setups and all that stuff, and the tests are extremely basic so far but show good results.

There is some more cleanup to do, but once that's done I could backport the changes I made to the rocksdb example and see if I can port the jepsen test we have to support that example. I'll not validate "every" application built with open-raft, but it would showcase that it's possible to build a valid application with open raft and could serve as a template for tests for other applications.

Is there interest in that addition?

github-actions[bot] commented 2 years ago

👋 Thanks for opening this issue!

Get help or engage by:

lichuang commented 2 years ago

Thankfully, we are also trying to introduce some distributed testing frameworks in openraft.

Currently I am working on how stateright.rs, a distributed testing framework written in Rust, can be introduced into the openraft project, the difference between jepsen and the stateright.rs is that:

So, if you are adding jepsen tests, this will be helpful.

drmingdrmer commented 2 years ago

Yes! It'd be appreciated!

Openraft has been developed in a design-driven manner. Tests are mainly used to check the correctness of the implementation of the algorithm(APIs of Engine), and overall behavior(APIs of Raft). While the correctness of the complete working flow(Raft <-> RaftCore <-> Engine) is not covered very well, e.g., the correctness of internal message ordering and validation has only been examined by a human brain:(.

A Jepsen test will be a necessary complementary part of the test suite.

Licenser commented 1 year ago

cc @mfelsche