apple / apple/foundationdb

Move write-only transactions to the end of commit batches

Open
#3,741 2 comments 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

Write-only transactions can't be aborted due to conflicts (barring self-conflicts), but they can cause unnecessary intra-batch conflicts for other transactions. This problem can be mitigated by moving all transactions with empty read-conflict sets (again, excluding self-conflict keys) to the end of all commit batches. The two main downsides to this approach are:

1) Increases proxy CPU usage.
2) Makes it more likely that transactions from the same client will be committed in a different order than `commit` is called. This is already a possibility though, so this is not a major weakness.

Given these weaknesses, this may only be a worthwhile change for certain workloads that have lots of write-only transactions and a high conflict-rate.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the proxy constructs commit batches and represents read-conflict sets; the issue gives no file or test entry point. Determine where transactions with empty read-conflict sets can be identified while excluding self-conflict keys, then assess the CPU and commit-order tradeoffs. Done means the behavior is implemented and validated for conflict-heavy workloads without breaking transaction ordering guarantees.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems, performance
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.