Buffer Improvements: add adversarial filesystem test variants for disk buffer v2 #10324
Labels
domain: buffers
Anything related to Vector's memory/disk buffers
domain: reliability
Anything related to Vector's reliability
type: task
Generic non-code related tasks
Part of the Buffer Improvements RFC (RFC, #9476)
As part of the work on #10143, we opted to defer adding tests which exercise the new disk buffer implementation by using an underlying filesystem that was "adversarial", or had the ability to inject errors that might normally be rare in practice for the purpose of ensuring that we handle, and catch, these errors.
What this should likely be a first pass is some variant of
buffer_perf
, where we point it to store its data on the aforementioned adversarial filesystem, and then track what writes are successful vs not successful, and what we see from the reader side, and if the two match up. Essentially, the goal becomes: if we got no error back when writing and flushing a record, we should be able to read it back, or correctly detect when the data was modified outside of our control, and be able to account for every single attempted write.One option could be to explore CharybdeFS as the adversarial filesystem implementation, as it is relatively well-maintained, should be battle-tested as it's written and used by ScyllaDB, and is programmatic controllable via Thrift RPC which should be easy to integrate into a test harness.
Another option that is slightly more integrate-able would be to use something like fuser to allow creating and controlling our target filesystem entirely in Rust. This could allow for writing the entire chunk of testing code in Rust, and potentially as a single binary that could be then fed a seed for the RNG used to choose which FS operations succeed or fail.
The text was updated successfully, but these errors were encountered: