apple / apple/foundationdb

Continue providing read versions during master recoveries

Open
#1,006 0 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

During a master recovery, no new transactions can be started by the proxies. The project would allow proxies to continue to give out read versions during a master recovery, which would allow read-only transactions to continue without interruption during a master recovery.

Proposed design:
* The MasterProxyServer will be split into two separate roles, commit proxies and read version proxies. The commit proxies are responsible for processing client commits. They will be part of the transaction subsystem, and will be re-recruited with each master recovery. The read version are responsible for providing read versions and answering key server location requests. They will live independent of the transaction subsystem.
* Version proxies are elected by the cluster controller independently of the master.
* In the configuration we chose an extra amount of log replicas reserved for read availability during log failures.
* To provide a version to a client, the version proxy asks all tlogs for their committed version. The version proxy waits for replies until all but [extra log replicas] logs have responded. The minimum version from the replies is the read version.
* Master recovery treats the extra log replicas similar to having an anti-quorum.
* The read proxies peaks the TXS tag from the local logs and are responsible for answering getKeyServerLocations requests.
* At the end of master recovery, after writing the final write to the coordinated state, but before notifying the cluster controller about being fully recovered, all old tlogs still in the coordinated state are read-locked which will prevent them from providing read versions.

Contributor guide

Open the contributing guide

Research direction

No file or test is identified. Start by tracing the MasterProxyServer, transaction subsystem, cluster controller, and local tlog responsibilities described here, including getKeyServerLocations and the TXS tag. Done means read versions remain available during master recovery while commit proxies and old tlogs follow the proposed recovery boundaries.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.