apple / apple/foundationdb

Give users ability to change disk behavior in Simulator

Open
#1,181 2 comments 0 reactions 1 assignee Assigned to @tclinken View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

Disks in the simulator are currently implemented in a very simple way: the
simulator will make a blocking request and then delay for a random amount of
time. This is good enough for most tests, but it is inflexible if one wants to
test how FDB behaves. Furthermore it is currently not possible to simulate
failing disks.

The problem here is that the test dimensions are getting huge. Optimally we
would like to test the following:

- Different kind of disks (like SSD, HDD, EBS, GCP Block Storage, Azure Storage
disks, NVM...)
- Different performance behaviors:
- Running out of IOPS (so stop executing operations until the next second
starts). This would be interesting to simulate Cloud provider's disks like
EBS.
- Larger differences in latency (for network disks) and higher latencies in
general.
- Different kind of disk failures: There should be a low probability that a disk
fails. This is hard to implement as too many disk failures (or disk failures
on clusters without replication) can make a test fail legitimately. However,
this is what I would like to simulate in this area:
- Disk starts throwing errors for read/write operations.
- Some operations return `Never` - simulating a blocking operation.
- Read requests start reading garbage instead of the actual data.
- Write requests write garbage.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.