RFC + Support of BACKUP and RESTORE statements (#15274)#16960
Merged
sre-bot merged 2 commits intopingcap:release-4.0from May 6, 2020
Merged
RFC + Support of BACKUP and RESTORE statements (#15274)#16960sre-bot merged 2 commits intopingcap:release-4.0from
sre-bot merged 2 commits intopingcap:release-4.0from
Conversation
Contributor
Author
|
/run-all-tests |
Contributor
|
/run-all-tests |
Contributor
|
/rebuild plugin=pr/35 |
Contributor
|
/run-integration-copr-test |
1 similar comment
Contributor
|
/run-integration-copr-test |
Contributor
|
/rebuild plugin=pr/35 |
Contributor
|
/run-integration-copr-test |
Contributor
failure in sql/randgen-topn/3_compare_1.sql |
Contributor
Author
|
/run-all-tests |
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.
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.BRIEStmtin 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
tpccinto 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 nto 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.)