[feature](restore) support concurrent backup/restore#61710
Open
Ryan19929 wants to merge 1 commit intoapache:masterfrom
Open
[feature](restore) support concurrent backup/restore#61710Ryan19929 wants to merge 1 commit intoapache:masterfrom
Ryan19929 wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 26665 ms |
TPC-DS: Total hot run time: 169216 ms |
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Doris currently only allows one backup/restore job per database at a time, which becomes a bottleneck in CCR scenarios where dozens of tables need concurrent synchronization.
This PR implements table-level backup/restore concurrency control (gated by
enable_table_level_backup_concurrency, defaultfalse):Dual-queue scheduling — Splits the single job queue into Running queue (active jobs) + History queue (finished jobs). New jobs enter PENDING state; the scheduler promotes PENDING jobs to
allowedJobIdsfor execution based on the following rules. Jobs exceedingbackup_pending_job_timeout_msin queue are auto-cancelled.OOM protection — Extends
max_backup_tablets_per_jobto RestoreJob; addsmax_concurrent_snapshot_tasks_totalfor global snapshot task cap across all concurrent jobs.CANCEL label filter — Supports
CANCEL BACKUP/RESTORE WHERE LABEL = 'xxx'andWHERE LABEL LIKE 'xxx%'to cancel specific jobs. Without WHERE clause, cancels all matching jobs in the database (behavior change only in concurrency mode; legacy mode unchanged).Observability — Adds
QueuePosandBlockReasoncolumns toSHOW BACKUP/RESTORE.CCR compatibility — Derives
tableRefsfromBackupJobInfowhen RPC requests omittable_refs, ensuring correct table-level concurrency control.Scheduling Rules:
runningBackups + runningRestores >= max_backup_restore_concurrent_num_per_dbDesign Note: Full-database backup submissions are hard-rejected when one already exists, because the backup snapshot is reusable — any subsequent backup would be redundant. Full-database restore submissions are queued (PENDING) instead, because each restore may target a different snapshot and has independent business value — they just cannot run concurrently.
Check List (For Author)
Test
Behavior changed:
concurrency mode only:
CANCEL BACKUP/RESTOREwithout WHERE clause cancels all unfinished jobs of that type in the database, instead of just the single running job. This only applies whenenable_table_level_backup_concurrency = true; legacy mode behavior is unchanged.Does this need documentation?
Check List (For Reviewer who merge this PR)