Coordinate BackupAgent and DataDistributor to compute partitions for range-partitioned backup (V3)#13304
Open
akankshamahajan15 wants to merge 3 commits into
Open
Coordinate BackupAgent and DataDistributor to compute partitions for range-partitioned backup (V3)#13304akankshamahajan15 wants to merge 3 commits into
akankshamahajan15 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Wires BackupAgent ↔ DataDistributor coordination for computing the key-range partitions used by the experimental range-partitioned backup. BackupAgent writes a small request value (1 on first range-partitioned backup start, 2 on last stop) to a new system key, and DataDistributor watches it, calls calculateBackupPartitionKeyRanges, and stores the resulting vector<KeyRange> to a second system key (or clears it on stop).
Changes:
- Add two
\xff\x02/system keys (backupPartitionRequiredKey,backupPartitionListKey) with encode/decode helpers. - Add
monitorBackupPartitionRequiredactor inDataDistribution.cpp, started alongside the shard tracker so it shares the sameKeyRangeMap<ShardTrackedData>. - Have
StartFullBackupTaskFuncandclearBackupStartIDset values1/2on first/last range-partitioned backup transitions, piggybacking on thebackupStartedKeytransaction.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| fdbclient/SystemData.cpp | Defines the two new system keys and four encode/decode helpers using Unversioned()/IncludeVersion() writers. |
| fdbclient/include/fdbclient/SystemData.h | Declares the new keys/helpers and documents the 0/1/2 request-value scheme. |
| fdbclient/FileBackupAgent.cpp | Writes request value 1 when starting the first range-partitioned backup and 2 when the last one is cleared. |
| fdbserver/core/include/fdbserver/core/BackupPartitionMap.h | Includes KeyRangeMap.h, switches typedefs to using, and declares calculateBackupPartitionKeyRanges. |
| fdbserver/datadistributor/DataDistribution.cpp | Adds monitorBackupPartitionRequired actor that watches the request key, computes/clears partitions, and writes the partition list. |
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
b8508c9 to
c0fa69d
Compare
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes following changes:
BACKUP_NUM_OF_PARTITIONS(default 100) controlling how many partitionscalculateBackupPartitionKeyRangesproduces.Coordination between BackupAgent and DataDistributor
writes 2 when removing the last UID; the read-then-write happens in the same txn as the backupStartedKey update.
Testing
100K Completed
20260530-022602-ak_bk_dd_2-43582fe4cfa1abb9 compressed=True data_size=37179731 duration=2238936 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=0:26:37 sanity=False started=100000 stopped=20260530-025239 submitted=20260530-022602 timeout=5400 username=ak_bk_dd_2