Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a Jepsen style bank test for Badger #577
This change breaks Value API. Instead of Value returning a byte slice, we now expose the byte slice from within a function. This is because when we read a value, we acquire a read lock on the value log. With the previous API it was possible for a transaction to deadlock, if multiple reads are done on the same log file, and those read locks get interleaved with a write lock caused by log file rotation. The new API fixes that by releasing the lock before another value is read; and also makes it obvious to the end user that they must copy the value to be able to use it outside the function.
This change also adds a Jepsen style bank test for Badger, which is currently showing some transaction violations, needing further investigation.