apple / apple/foundationdb

All-in-one in-memory client driver for testing

Open
#4,155 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

When writing unit tests for layers (or other FDB client usages), typically a test will run as if it is the sole user of the cluster, and tests, today, have to go to lengths to ensure that each test run uses a different key prefix, or clean up a fixed key space prior to running, to allow tests to isolate themselves from one another. This generally works well, but it is compounded by other cluster-wide data that takes more effort, such as the directory layer.

Given how the simulation framework works, it seems like it wouldn't be a huge stretch to have a special client driver (or a configuration of the existing driver), to run the cluster code within the driver itself such that, at minimum, the driver could connect to a "virtual" cluster that is configured to write to a directory that is unique to the test or, for bonus points, use a truly in-memory storage engine.

Contributor guide

Open the contributing guide

Research direction

Start by studying the simulation framework and the existing client driver, which the issue identifies as the relevant starting points. Define what a virtual cluster must provide for isolated tests, including a unique directory and, if feasible, an in-memory storage engine; done means tests can connect without manual key-prefix isolation or cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.