Backup's begin version is lower than the actual version
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
While working on the new backup system, I found that current backup's `properties/log_begin_version` specifies a version that is smaller than the actual beginning version. The cause is that this version is chosen first in a transaction, and then a second transaction starts the backup. The actually mutations are logged after the second transaction is executed. As a result, mutations between these two transactions are missing.
This doesn't affect correctness, since range files and mutation logs together can still provide a consistent snapshot of the database, as they are recorded after the second transaction.
Specifically, the first transaction to get read version is here: https://github.com/apple/foundationdb/blob/1700d479c9f0047a0e6ecfa665b9ba34f3f18d2f/fdbclient/FileBackupAgent.actor.cpp#L2390
The second transaction is: https://github.com/apple/foundationdb/blob/1700d479c9f0047a0e6ecfa665b9ba34f3f18d2f/fdbclient/FileBackupAgent.actor.cpp#L2415
Contributor guide
Research direction
Read fdbclient/FileBackupAgent.actor.cpp at the two linked transaction sites around lines 2390 and 2415, then trace how their read versions populate properties/log_begin_version. Confirm the intended relationship between the first read version, the backup-start transaction, and subsequent mutation logging. Done means the reported begin version reflects the actual backup boundary without omitting mutations; no test path is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100