-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC + Support of BACKUP and RESTORE statements (#15274) #16960
Conversation
/run-all-tests |
/run-all-tests |
/rebuild plugin=pr/35 |
/run-integration-copr-test |
1 similar comment
/run-integration-copr-test |
/rebuild plugin=pr/35 |
/run-integration-copr-test |
failure in sql/randgen-topn/3_compare_1.sql
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
cherry-pick #15274 to release-4.0
What problem does this PR solve?
Support running BR inside TiDB directly.
What is changed and how it works?
Recognize the new
*ast.BRIEStmt
in pingcap/parser#746, and forward to the library functions in BR. When we executeTiDB will spawn a new BR manager which backs up the database
tpcc
into the provided storage. The query blocks until backup completes. Returns an empty set on success:and returns an error on failure:
BRIE tasks must be executed sequentially. Currently, for simplicity, tasks are queued in the local server only. In the future we make the entire cluster share the same queue.
Use SHOW BACKUP / SHOW RESTORE in another session to list the tasks
Use
KILL TIDB QUERY n
to cancel a task.Check List
Tests
a simple tableW=30 TPC-C database (2 GB), drop it, and run restore from the archive.Code changes
Side effects
Related changes
Release note
Added the RESTORE statement to restore from the backup archive.(don't include into release note yet, do so after the entire feature is complete.)