apple / apple/foundationdb

Cached read versions should have a minimum version transaction option to guarantee causality

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

Description

The cached read version feature (see: #5725) allows the user to sacrifice causality (or the "strict" in "strict serializability") as an optimization to avoid needing to perform a read version with every transaction. One enhancement that wasn't in the initial design is to provide a "minimum read version" transaction option that can serve as a causality token for users who care about seeing their own writes but are okay missing others. For example, a client might commit on one process and get a commit response which includes a causality token (potentially opaque to them, but containing the commit version), and then they can go to another, unrelated process and ask for a cached read version with that token that is guaranteed to see the previous commit.

This could also be used in configurations where there are multiple client threads for the same database, for which cached read versions could result in missing transactions issued by the same client (but which wound up in different threads). In that case, a higher level abstraction existing above the client binding could even keep track of the read and commit versions so that all reads are guaranteed to see all previously committed transactions issued from that client without the user having to keep track of the causality token themselves.

Contributor guide

Open the contributing guide

Research direction

Start by reading the cached read version design referenced in issue #5725 and trace how transaction read versions and commit responses are represented. Define the minimum read version option and its causality-token behavior, including cross-process and multi-thread cases; done means the design is specified and covered by appropriate transaction behavior tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.