Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

*: update pd deps to v4 #184

Merged
merged 2 commits into from
Mar 12, 2020
Merged

*: update pd deps to v4 #184

merged 2 commits into from
Mar 12, 2020

Conversation

kennytm
Copy link
Collaborator

@kennytm kennytm commented Mar 11, 2020

What problem does this PR solve?

Upgrade TiDB deps to latest master and PD deps to its corresponding dependency.

This involves upgrading the import paths of the PD deps to v4.

This is needed for integrating BR into TiDB. (Without this upgrade, TiDB will import both the pre-v4 and v4 versions of PD, which both register the same Prometheus metrics, and cause a runtime panic.)

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

  • Has interface methods change
    • (glue.Glue).Open takes the security options for v4 PD rather than pre-v4 PD.

Side effects

Related changes

@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #184 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   69.91%   69.91%           
=======================================
  Files          45       45           
  Lines        4038     4038           
=======================================
  Hits         2823     2823           
  Misses        846      846           
  Partials      369      369           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3419d8a...e5c9a22. Read the comment docs.

Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@overvenus overvenus added the status/LGT1 LGTM1 label Mar 11, 2020
@3pointer 3pointer merged commit e476c82 into pingcap:master Mar 12, 2020
kennytm added a commit that referenced this pull request Mar 20, 2020
* restore: merge tidb-tools/pkg/restore-util (#146)

* restore-util: Implement split/scatter (#274)

* implement split/scatter

Signed-off-by: 5kbpers <[email protected]>

* init test

Signed-off-by: 5kbpers <[email protected]>

* redesign output/input of the lib

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* add commments and more tests

Signed-off-by: 5kbpers <[email protected]>

* add ScanRegions interface to Client

Signed-off-by: 5kbpers <[email protected]>

* fix potential data race

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore-util/client.go

Co-Authored-By: kennytm <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* resolve conflicts

Signed-off-by: 5kbpers <[email protected]>

* fix prefix rewrite

Signed-off-by: 5kbpers <[email protected]>

* add RewriteRule/skip failed scatter region/retry the SplitRegion

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* check if region has peer

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add split retry interval (#277)

* reset dependencies to release-3.1

* add split retry interval

Signed-off-by: 5kbpers <[email protected]>

* fix go.sum

Signed-off-by: 5kbpers <[email protected]>

* restore-util: wait for scatter region sequentially  (#279)

* wait for scatter region sequentially

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add on split hook (#281)

* restore-util: add on split hook

Signed-off-by: Neil Shen <[email protected]>

* Nil check onSplit

Co-Authored-By: kennytm <[email protected]>

* restore-util: fix returned new region is nil (#283)

* restore-util: fix returned new region is nil

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* *: gofmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* restore-util: call onSplit on splitByRewriteRules (#285)

Signed-off-by: Neil Shen <[email protected]>

* restore-util: fix overlapped error message (#293)

* restore-util: fix overlapped error message

Signed-off-by: 5kbpers <[email protected]>

* fix log message

Signed-off-by: 5kbpers <[email protected]>

* reduce error trace

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: log warning when cannot find matched rewrite rule (#299)

* restore-util: add method to set placement rules and store labels (#301)

* restore-util: add method to set placement rules and store labels

Signed-off-by: disksing <[email protected]>

* minor fix

Signed-off-by: disksing <[email protected]>

* address comment

Signed-off-by: disksing <[email protected]>

* add GetPlacementRules

Signed-off-by: disksing <[email protected]>

* fix test

Signed-off-by: disksing <[email protected]>

* restore-util: support batch split (#300)

* restore-util: support batch split

Signed-off-by: 5kbpers <[email protected]>

* go fmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* address commits

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/restore-util/split.go

Co-Authored-By: kennytm <[email protected]>

* add onSplit callback

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add upper bound time for waiting for scatter (#305)

* restore: fix scatter regions failed

Signed-off-by: 5kbpers <[email protected]>

* add log

Signed-off-by: 5kbpers <[email protected]>

* stop waiting for scatter after 3min

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: fix wrong url (#306)

Signed-off-by: disksing <[email protected]>

* restore-util: add warning about unmatched table id (#313)

* restore-util: support table partition

Signed-off-by: 5kbpers <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* warn table id does not match

Signed-off-by: 5kbpers <[email protected]>

* add unit tests

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Neil Shen <[email protected]>

* fix compile error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Ian <[email protected]>
Co-authored-by: Neil Shen <[email protected]>

* *: prune tidb-tools

Signed-off-by: Neil Shen <[email protected]>

* restore: address linters suggestions

Signed-off-by: Neil Shen <[email protected]>

* restore: merge restoreutil into restore

Signed-off-by: Neil Shen <[email protected]>

* address comment

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>

* Fixed handling for a dbName that do not exist in the backup being restored (#148)

* Fixed handling for a dbName that do not exist in the backup being restored

* Fixed handling for a dbName that do not exist in the backup being restored

* validate: fix debug meta test ci (#153)

* validate: fix debug meta test ci

* *: extracts runBackup/runRestore in cmd into pkg/task (#156)

* *: extracts runBackup/runRestore in cmd into pkg/task

Defines a "Config" structure to store the parsed flags.

Use the "black-white-list" structure to define what tables/databases to
backup/restore.

* go.mod: update tidb to v4.0.0-beta

* restore: fix restore summary log (#150)

Co-authored-by: kennytm <[email protected]>

* restore: enhance error handling (#152)

* restore: enhance error handling

Signed-off-by: 5kbpers <[email protected]>

* unit test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix region epoch error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* remove `Restore*`

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* add debug log

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore/import.go

Co-Authored-By: kennytm <[email protected]>

* fix retry error

Signed-off-by: 5kbpers <[email protected]>

* handle RegionNotFound error

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>

* Incremental BR: support DDL (#155)

* support backup&restore ddl

Signed-off-by: 5kbpers <[email protected]>

* integration tests

Signed-off-by: 5kbpers <[email protected]>

* update kvproto

Signed-off-by: 5kbpers <[email protected]>

* fix integration tests

Signed-off-by: 5kbpers <[email protected]>

* reduce cyclomatic complexity of `runRestore`

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* add unit test

Signed-off-by: 5kbpers <[email protected]>

* fix tests

Signed-off-by: 5kbpers <[email protected]>

* disable fast checksum in incremental br

Signed-off-by: 5kbpers <[email protected]>

* fix no valid key error

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Reduce TiDB dependencies (#158)

* utils: exclude mock_cluster outside of unit test

* utils: remove unused ResultSetToStringSlice()

* *: abstract away dependencies of tidb/session into a Glue interface

* *: fix hound lint

* util,mock: move utils.MockCluster to mock.Cluster

* restore: fix test build failure

Co-authored-by: 3pointer <[email protected]>

* go.mod: update tidb (#168)

Signed-off-by: Neil Shen <[email protected]>

* BR support TLS (#161)

* *: support tls

* move tikv.driver to glue

* fix comments

* upgrade golangci and prepare for go 1.14 (#171)

Signed-off-by: Neil Shen <[email protected]>

* backup: add raw backup command (#101)

* backup: add raw backup command

* restore: speed up retry on not leader (#179)

* tests: stable cluster start up

Signed-off-by: Neil Shen <[email protected]>

* tests: fix unbound var

Signed-off-by: Neil Shen <[email protected]>

* restore: speed retry on not leader

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* tests: add --cacert flag

Signed-off-by: Neil Shen <[email protected]>

* make codecov green

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* conn, restore: paginate scan regions (#165)

* conn, restore: paginate scan regions

Signed-off-by: Neil Shen <[email protected]>

* tests: large timeout

Signed-off-by: Neil Shen <[email protected]>

* Batch restore (#167)

* *: unify Range and RangeTree

Signed-off-by: Neil Shen <[email protected]>

* restore: split restore files into small batch

Signed-off-by: Neil Shen <[email protected]>

* task: set default restore concurrency to 128

Signed-off-by: Neil Shen <[email protected]>

* restore: unused table worker pool

Signed-off-by: Neil Shen <[email protected]>

* summary: sum up repeated duration and int

Signed-off-by: Neil Shen <[email protected]>

* rtree: move rtree from utils to pkg

Signed-off-by: Neil Shen <[email protected]>

* README, docker: add quick start (#181)

* README, docker: add quick start

Signed-off-by: Neil Shen <[email protected]>

* cmd: disable some TiDB log

Signed-off-by: Neil Shen <[email protected]>

* docker: build go-ycsb automatically

Signed-off-by: Neil Shen <[email protected]>

* cmd: add TODO about TiDB logs

Signed-off-by: Neil Shen <[email protected]>

* *: update tidb dependency build with go1.14 (#176)

* *: add license header (#182)

* rtree: move checkFile into backup

Signed-off-by: Neil Shen <[email protected]>

* *: add license header

Signed-off-by: Neil Shen <[email protected]>

* Update LICENSE.md

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>
Co-authored-by: 3pointer <[email protected]>

* conn: support not shutting down the storage when closing the connection (#185)

Co-authored-by: 3pointer <[email protected]>

* conn: use GetDomain to avoid some TiDB breaking changes (#186)

* conn: use GetDomain to avoid some TiDB breaking changes

Signed-off-by: Neil Shen <[email protected]>

* minor usability improvement

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* fix check safepoint & unhide experimental features (#175)

* backup: check safepoint for last backup ts

Signed-off-by: 5kbpers <[email protected]>

* check lastbackupts > 0

Signed-off-by: 5kbpers <[email protected]>

* unhide experimental features

Signed-off-by: 5kbpers <[email protected]>

* address comment

Signed-off-by: 5kbpers <[email protected]>

* Update tests/br_z_gc_safepoint/run.sh

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>

* support backupts (#172)

* support backupts

* address comment

* address comment

* fix space

* *: update pd deps to v4 (#184)

Co-authored-by: 3pointer <[email protected]>

* restore: support online restore (#114)

Signed-off-by: disksing <[email protected]>

* metrics: add grafana scripts (#140)

* add grafana scripts

* fix

Co-authored-by: 3pointer <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: kennytm <[email protected]>

* filter out all TiFlash nodes when retrieving lists of stores from PD (#187)

* conn: ignore nodes with label engine=tiflash

* conn: disallow TiFlash on restore, only skip TiFlash on backup

* Create integration test for S3 storage (#174)

* Fix summary log (#191)

* *: fix restore summary log after restore logic changed to files

* fix

* fix

* fix

Co-authored-by: kennytm <[email protected]>

* Implement Raw Restore (#104)

* Update kvproto

* Implement raw restore

* fix build

* Set range for file importer

Signed-off-by: MyonKeminta <[email protected]>

* Remove unnecessary comments

Signed-off-by: MyonKeminta <[email protected]>

* check cf and support multi ranges in BackupMeta

Signed-off-by: MyonKeminta <[email protected]>

* Check files' cf; address comments

* adjust structure to keep consistent with master

* Fix build

Signed-off-by: MyonKeminta <[email protected]>

* Fix build and make check, avoid accessing TiDB in rawkv mode

* Fix test

Signed-off-by: MyonKeminta <[email protected]>

* Fix tests

Signed-off-by: MyonKeminta <[email protected]>

* Fix broken logic after merging master

* Update pkg/task/restore_raw.go

Co-Authored-By: Neil Shen <[email protected]>

* Address comments

* Address comments

* Mark raw restore as experimental

* Fix build

* Address comments

* test: Add check for deleting data and partial backup

* Fix build

* Add license header

* fix ci

* fix ci

Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>

* restore: remove tiflash replica before restore (#194)

* restore: remove tiflash replica before restore

Signed-off-by: 5kbpers <[email protected]>

* rename errSplit variable

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* check replica count by region info

Signed-off-by: 5kbpers <[email protected]>

* cleanup

Signed-off-by: 5kbpers <[email protected]>

* save tiflash replica count to backupmeta

Signed-off-by: 5kbpers <[email protected]>

* fix save crcxor

Signed-off-by: 5kbpers <[email protected]>

* fix decode the key of placement rule

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* close domain after restoring tiflash-replica

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/task/restore.go

Co-Authored-By: 3pointer <[email protected]>

Co-authored-by: 3pointer <[email protected]>

* summary: put summary log at last (#197)

* summary: put summary log at last

* fix switch sql

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>
Co-authored-by: Kolbe Kegel <[email protected]>
Co-authored-by: WangXiangUSTC <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>
3pointer added a commit that referenced this pull request Apr 2, 2020
* restore: fix alter auto increment id for no-primary-key table (#139)

* restore: fix alter auto increment id for no-primary-key table

Signed-off-by: 5kbpers <[email protected]>

* add integration test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* *: use oracle package to manipulate ts and test gc safe point  (#121)

Signed-off-by: Neil Shen <[email protected]>

* cmd: convert version command to flags (#144)

* cmd: convert version command to flags

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* *: add changelog and github templates (#143)

Signed-off-by: Neil Shen <[email protected]>

* restore: merge tidb-tools/pkg/restore-util (#146)

* restore-util: Implement split/scatter (#274)

* implement split/scatter

Signed-off-by: 5kbpers <[email protected]>

* init test

Signed-off-by: 5kbpers <[email protected]>

* redesign output/input of the lib

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* add commments and more tests

Signed-off-by: 5kbpers <[email protected]>

* add ScanRegions interface to Client

Signed-off-by: 5kbpers <[email protected]>

* fix potential data race

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore-util/client.go

Co-Authored-By: kennytm <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* resolve conflicts

Signed-off-by: 5kbpers <[email protected]>

* fix prefix rewrite

Signed-off-by: 5kbpers <[email protected]>

* add RewriteRule/skip failed scatter region/retry the SplitRegion

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* check if region has peer

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add split retry interval (#277)

* reset dependencies to release-3.1

* add split retry interval

Signed-off-by: 5kbpers <[email protected]>

* fix go.sum

Signed-off-by: 5kbpers <[email protected]>

* restore-util: wait for scatter region sequentially  (#279)

* wait for scatter region sequentially

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add on split hook (#281)

* restore-util: add on split hook

Signed-off-by: Neil Shen <[email protected]>

* Nil check onSplit

Co-Authored-By: kennytm <[email protected]>

* restore-util: fix returned new region is nil (#283)

* restore-util: fix returned new region is nil

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* *: gofmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* restore-util: call onSplit on splitByRewriteRules (#285)

Signed-off-by: Neil Shen <[email protected]>

* restore-util: fix overlapped error message (#293)

* restore-util: fix overlapped error message

Signed-off-by: 5kbpers <[email protected]>

* fix log message

Signed-off-by: 5kbpers <[email protected]>

* reduce error trace

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: log warning when cannot find matched rewrite rule (#299)

* restore-util: add method to set placement rules and store labels (#301)

* restore-util: add method to set placement rules and store labels

Signed-off-by: disksing <[email protected]>

* minor fix

Signed-off-by: disksing <[email protected]>

* address comment

Signed-off-by: disksing <[email protected]>

* add GetPlacementRules

Signed-off-by: disksing <[email protected]>

* fix test

Signed-off-by: disksing <[email protected]>

* restore-util: support batch split (#300)

* restore-util: support batch split

Signed-off-by: 5kbpers <[email protected]>

* go fmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* address commits

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/restore-util/split.go

Co-Authored-By: kennytm <[email protected]>

* add onSplit callback

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add upper bound time for waiting for scatter (#305)

* restore: fix scatter regions failed

Signed-off-by: 5kbpers <[email protected]>

* add log

Signed-off-by: 5kbpers <[email protected]>

* stop waiting for scatter after 3min

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: fix wrong url (#306)

Signed-off-by: disksing <[email protected]>

* restore-util: add warning about unmatched table id (#313)

* restore-util: support table partition

Signed-off-by: 5kbpers <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* warn table id does not match

Signed-off-by: 5kbpers <[email protected]>

* add unit tests

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Neil Shen <[email protected]>

* fix compile error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Ian <[email protected]>
Co-authored-by: Neil Shen <[email protected]>

* *: prune tidb-tools

Signed-off-by: Neil Shen <[email protected]>

* restore: address linters suggestions

Signed-off-by: Neil Shen <[email protected]>

* restore: merge restoreutil into restore

Signed-off-by: Neil Shen <[email protected]>

* address comment

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>

* Fixed handling for a dbName that do not exist in the backup being restored (#148)

* Fixed handling for a dbName that do not exist in the backup being restored

* Fixed handling for a dbName that do not exist in the backup being restored

* validate: fix debug meta test ci (#153)

* validate: fix debug meta test ci

* *: extracts runBackup/runRestore in cmd into pkg/task (#156)

* *: extracts runBackup/runRestore in cmd into pkg/task

Defines a "Config" structure to store the parsed flags.

Use the "black-white-list" structure to define what tables/databases to
backup/restore.

* go.mod: update tidb to v4.0.0-beta

* restore: fix restore summary log (#150)

Co-authored-by: kennytm <[email protected]>

* restore: enhance error handling (#152)

* restore: enhance error handling

Signed-off-by: 5kbpers <[email protected]>

* unit test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix region epoch error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* remove `Restore*`

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* add debug log

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore/import.go

Co-Authored-By: kennytm <[email protected]>

* fix retry error

Signed-off-by: 5kbpers <[email protected]>

* handle RegionNotFound error

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>

* Incremental BR: support DDL (#155)

* support backup&restore ddl

Signed-off-by: 5kbpers <[email protected]>

* integration tests

Signed-off-by: 5kbpers <[email protected]>

* update kvproto

Signed-off-by: 5kbpers <[email protected]>

* fix integration tests

Signed-off-by: 5kbpers <[email protected]>

* reduce cyclomatic complexity of `runRestore`

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* add unit test

Signed-off-by: 5kbpers <[email protected]>

* fix tests

Signed-off-by: 5kbpers <[email protected]>

* disable fast checksum in incremental br

Signed-off-by: 5kbpers <[email protected]>

* fix no valid key error

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Reduce TiDB dependencies (#158)

* utils: exclude mock_cluster outside of unit test

* utils: remove unused ResultSetToStringSlice()

* *: abstract away dependencies of tidb/session into a Glue interface

* *: fix hound lint

* util,mock: move utils.MockCluster to mock.Cluster

* restore: fix test build failure

Co-authored-by: 3pointer <[email protected]>

* go.mod: update tidb (#168)

Signed-off-by: Neil Shen <[email protected]>

* BR support TLS (#161)

* *: support tls

* move tikv.driver to glue

* fix comments

* upgrade golangci and prepare for go 1.14 (#171)

Signed-off-by: Neil Shen <[email protected]>

* backup: add raw backup command (#101)

* backup: add raw backup command

* restore: speed up retry on not leader (#179)

* tests: stable cluster start up

Signed-off-by: Neil Shen <[email protected]>

* tests: fix unbound var

Signed-off-by: Neil Shen <[email protected]>

* restore: speed retry on not leader

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* tests: add --cacert flag

Signed-off-by: Neil Shen <[email protected]>

* make codecov green

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* conn, restore: paginate scan regions (#165)

* conn, restore: paginate scan regions

Signed-off-by: Neil Shen <[email protected]>

* tests: large timeout

Signed-off-by: Neil Shen <[email protected]>

* Batch restore (#167)

* *: unify Range and RangeTree

Signed-off-by: Neil Shen <[email protected]>

* restore: split restore files into small batch

Signed-off-by: Neil Shen <[email protected]>

* task: set default restore concurrency to 128

Signed-off-by: Neil Shen <[email protected]>

* restore: unused table worker pool

Signed-off-by: Neil Shen <[email protected]>

* summary: sum up repeated duration and int

Signed-off-by: Neil Shen <[email protected]>

* rtree: move rtree from utils to pkg

Signed-off-by: Neil Shen <[email protected]>

* README, docker: add quick start (#181)

* README, docker: add quick start

Signed-off-by: Neil Shen <[email protected]>

* cmd: disable some TiDB log

Signed-off-by: Neil Shen <[email protected]>

* docker: build go-ycsb automatically

Signed-off-by: Neil Shen <[email protected]>

* cmd: add TODO about TiDB logs

Signed-off-by: Neil Shen <[email protected]>

* *: update tidb dependency build with go1.14 (#176)

* *: add license header (#182)

* rtree: move checkFile into backup

Signed-off-by: Neil Shen <[email protected]>

* *: add license header

Signed-off-by: Neil Shen <[email protected]>

* Update LICENSE.md

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>
Co-authored-by: 3pointer <[email protected]>

* conn: support not shutting down the storage when closing the connection (#185)

Co-authored-by: 3pointer <[email protected]>

* conn: use GetDomain to avoid some TiDB breaking changes (#186)

* conn: use GetDomain to avoid some TiDB breaking changes

Signed-off-by: Neil Shen <[email protected]>

* minor usability improvement

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* fix check safepoint & unhide experimental features (#175)

* backup: check safepoint for last backup ts

Signed-off-by: 5kbpers <[email protected]>

* check lastbackupts > 0

Signed-off-by: 5kbpers <[email protected]>

* unhide experimental features

Signed-off-by: 5kbpers <[email protected]>

* address comment

Signed-off-by: 5kbpers <[email protected]>

* Update tests/br_z_gc_safepoint/run.sh

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>

* support backupts (#172)

* support backupts

* address comment

* address comment

* fix space

* *: update pd deps to v4 (#184)

Co-authored-by: 3pointer <[email protected]>

* restore: support online restore (#114)

Signed-off-by: disksing <[email protected]>

* metrics: add grafana scripts (#140)

* add grafana scripts

* fix

Co-authored-by: 3pointer <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: kennytm <[email protected]>

* filter out all TiFlash nodes when retrieving lists of stores from PD (#187)

* conn: ignore nodes with label engine=tiflash

* conn: disallow TiFlash on restore, only skip TiFlash on backup

* Create integration test for S3 storage (#174)

* Fix summary log (#191)

* *: fix restore summary log after restore logic changed to files

* fix

* fix

* fix

Co-authored-by: kennytm <[email protected]>

* Implement Raw Restore (#104)

* Update kvproto

* Implement raw restore

* fix build

* Set range for file importer

Signed-off-by: MyonKeminta <[email protected]>

* Remove unnecessary comments

Signed-off-by: MyonKeminta <[email protected]>

* check cf and support multi ranges in BackupMeta

Signed-off-by: MyonKeminta <[email protected]>

* Check files' cf; address comments

* adjust structure to keep consistent with master

* Fix build

Signed-off-by: MyonKeminta <[email protected]>

* Fix build and make check, avoid accessing TiDB in rawkv mode

* Fix test

Signed-off-by: MyonKeminta <[email protected]>

* Fix tests

Signed-off-by: MyonKeminta <[email protected]>

* Fix broken logic after merging master

* Update pkg/task/restore_raw.go

Co-Authored-By: Neil Shen <[email protected]>

* Address comments

* Address comments

* Mark raw restore as experimental

* Fix build

* Address comments

* test: Add check for deleting data and partial backup

* Fix build

* Add license header

* fix ci

* fix ci

Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>

* update dep

* restore: remove tiflash replica before restore (#194)

* restore: remove tiflash replica before restore

Signed-off-by: 5kbpers <[email protected]>

* rename errSplit variable

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* check replica count by region info

Signed-off-by: 5kbpers <[email protected]>

* cleanup

Signed-off-by: 5kbpers <[email protected]>

* save tiflash replica count to backupmeta

Signed-off-by: 5kbpers <[email protected]>

* fix save crcxor

Signed-off-by: 5kbpers <[email protected]>

* fix decode the key of placement rule

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* close domain after restoring tiflash-replica

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/task/restore.go

Co-Authored-By: 3pointer <[email protected]>

Co-authored-by: 3pointer <[email protected]>

* summary: put summary log at last (#197)

* summary: put summary log at last

* fix switch sql

* *: abstract the progress channel (updateCh) into the glue package (#196)

* *: abstract the progress channel (updateCh) into the glue package

* restore: fix crash in truncateTS() when the bound is unlimited

* task: fix comment

Co-authored-by: Ian <[email protected]>

* *: refline logs (#189)

* adapt pd/tidb related 3.1 changes

* tests: disable TLS test (#204)

Signed-off-by: Neil Shen <[email protected]>

* *: add S3 quick start and few enhancement of log (#202)

* README, docker: add quick start about S3 storage

Signed-off-by: Neil Shen <[email protected]>

* pkg/summary: make sure to output correct summary

Signed-off-by: Neil Shen <[email protected]>

* cmd, tests: log to terminal if BR_LOG_TO_TERM is set

Signed-off-by: Neil Shen <[email protected]>

* Update pkg/task/common.go

Co-Authored-By: kennytm <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* tests: cat log if br fails

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* restore: add error field to `DownloadResponse` (#195)

* restore: add error field to `DownloadResponse`

Signed-off-by: 5kbpers <[email protected]>

* restore: populate restore cancel error (#207)

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* enhance usability of br (#208)

* silenceUsage only when parse cmd flags failed

* udpate tidb

Co-authored-by: kennytm <[email protected]>

* task: do not run checksum if restore failed (#209)

* fix incremental bug in llroad test (#199)

* restore: filter same table ddl

* *: do not return error when backup/restore data is empty

* fix create database double during incremental restore

* add tests

* fix ci

* address comment

* add skip create sqls (#211)

* Revert "tests: disable TLS test (#204)" (#218)

This reverts commit e168a60.

* doc: add `minio` to dependence list. (#221)

The README of test omitted `minio` in the dependence list, which is needed for run the integration test.

Co-authored-by: Neil Shen <[email protected]>

* move waiting reject stores in import file (#222)

* move wait rejectstores into import files

* restore: use new table id to search placementRules

* Update pkg/restore/import.go

Co-Authored-By: Neil Shen <[email protected]>

* Update pkg/restore/import.go

Co-Authored-By: kennytm <[email protected]>

* fix ci

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>

* Max index length (#220)

* restore: set max-index-length to max

* restore:add max-index-length params

* address comment

* address comment

* glue: create schema/table directly with info (#216)

* glue: create schema/table directly with info

* go.mod: change to use the master version

* gluetidb: fix failure to create schema

* gluetidb: exclude non-public indices when restoring

* go.mod: removed unused replace

Co-authored-by: 3pointer <[email protected]>

* update deps

Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>
Co-authored-by: Kolbe Kegel <[email protected]>
Co-authored-by: WangXiangUSTC <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>
Co-authored-by: 庄天翼 <[email protected]>
Co-authored-by: 山岚 <[email protected]>
3pointer added a commit that referenced this pull request Apr 2, 2020
* restore: merge tidb-tools/pkg/restore-util (#146)

* restore-util: Implement split/scatter (#274)

* implement split/scatter

Signed-off-by: 5kbpers <[email protected]>

* init test

Signed-off-by: 5kbpers <[email protected]>

* redesign output/input of the lib

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* add commments and more tests

Signed-off-by: 5kbpers <[email protected]>

* add ScanRegions interface to Client

Signed-off-by: 5kbpers <[email protected]>

* fix potential data race

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore-util/client.go

Co-Authored-By: kennytm <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* update dependency

Signed-off-by: 5kbpers <[email protected]>

* resolve conflicts

Signed-off-by: 5kbpers <[email protected]>

* fix prefix rewrite

Signed-off-by: 5kbpers <[email protected]>

* add RewriteRule/skip failed scatter region/retry the SplitRegion

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* check if region has peer

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add split retry interval (#277)

* reset dependencies to release-3.1

* add split retry interval

Signed-off-by: 5kbpers <[email protected]>

* fix go.sum

Signed-off-by: 5kbpers <[email protected]>

* restore-util: wait for scatter region sequentially  (#279)

* wait for scatter region sequentially

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add on split hook (#281)

* restore-util: add on split hook

Signed-off-by: Neil Shen <[email protected]>

* Nil check onSplit

Co-Authored-By: kennytm <[email protected]>

* restore-util: fix returned new region is nil (#283)

* restore-util: fix returned new region is nil

Signed-off-by: 5kbpers <[email protected]>

* more logs

Signed-off-by: 5kbpers <[email protected]>

* *: gofmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* restore-util: call onSplit on splitByRewriteRules (#285)

Signed-off-by: Neil Shen <[email protected]>

* restore-util: fix overlapped error message (#293)

* restore-util: fix overlapped error message

Signed-off-by: 5kbpers <[email protected]>

* fix log message

Signed-off-by: 5kbpers <[email protected]>

* reduce error trace

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: log warning when cannot find matched rewrite rule (#299)

* restore-util: add method to set placement rules and store labels (#301)

* restore-util: add method to set placement rules and store labels

Signed-off-by: disksing <[email protected]>

* minor fix

Signed-off-by: disksing <[email protected]>

* address comment

Signed-off-by: disksing <[email protected]>

* add GetPlacementRules

Signed-off-by: disksing <[email protected]>

* fix test

Signed-off-by: disksing <[email protected]>

* restore-util: support batch split (#300)

* restore-util: support batch split

Signed-off-by: 5kbpers <[email protected]>

* go fmt

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* address commits

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/restore-util/split.go

Co-Authored-By: kennytm <[email protected]>

* add onSplit callback

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: add upper bound time for waiting for scatter (#305)

* restore: fix scatter regions failed

Signed-off-by: 5kbpers <[email protected]>

* add log

Signed-off-by: 5kbpers <[email protected]>

* stop waiting for scatter after 3min

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* restore-util: fix wrong url (#306)

Signed-off-by: disksing <[email protected]>

* restore-util: add warning about unmatched table id (#313)

* restore-util: support table partition

Signed-off-by: 5kbpers <[email protected]>

* fix log

Signed-off-by: 5kbpers <[email protected]>

* warn table id does not match

Signed-off-by: 5kbpers <[email protected]>

* add unit tests

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Neil Shen <[email protected]>

* fix compile error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Ian <[email protected]>
Co-authored-by: Neil Shen <[email protected]>

* *: prune tidb-tools

Signed-off-by: Neil Shen <[email protected]>

* restore: address linters suggestions

Signed-off-by: Neil Shen <[email protected]>

* restore: merge restoreutil into restore

Signed-off-by: Neil Shen <[email protected]>

* address comment

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>

* Fixed handling for a dbName that do not exist in the backup being restored (#148)

* Fixed handling for a dbName that do not exist in the backup being restored

* Fixed handling for a dbName that do not exist in the backup being restored

* validate: fix debug meta test ci (#153)

* validate: fix debug meta test ci

* *: extracts runBackup/runRestore in cmd into pkg/task (#156)

* *: extracts runBackup/runRestore in cmd into pkg/task

Defines a "Config" structure to store the parsed flags.

Use the "black-white-list" structure to define what tables/databases to
backup/restore.

* go.mod: update tidb to v4.0.0-beta

* restore: fix restore summary log (#150)

Co-authored-by: kennytm <[email protected]>

* restore: enhance error handling (#152)

* restore: enhance error handling

Signed-off-by: 5kbpers <[email protected]>

* unit test

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* fix region epoch error

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* remove `Restore*`

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* add debug log

Signed-off-by: 5kbpers <[email protected]>

* Apply suggestions from code review

Co-Authored-By: kennytm <[email protected]>

* Update pkg/restore/import.go

Co-Authored-By: kennytm <[email protected]>

* fix retry error

Signed-off-by: 5kbpers <[email protected]>

* handle RegionNotFound error

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>

* Incremental BR: support DDL (#155)

* support backup&restore ddl

Signed-off-by: 5kbpers <[email protected]>

* integration tests

Signed-off-by: 5kbpers <[email protected]>

* update kvproto

Signed-off-by: 5kbpers <[email protected]>

* fix integration tests

Signed-off-by: 5kbpers <[email protected]>

* reduce cyclomatic complexity of `runRestore`

Signed-off-by: 5kbpers <[email protected]>

* fix test

Signed-off-by: 5kbpers <[email protected]>

* add unit test

Signed-off-by: 5kbpers <[email protected]>

* fix tests

Signed-off-by: 5kbpers <[email protected]>

* disable fast checksum in incremental br

Signed-off-by: 5kbpers <[email protected]>

* fix no valid key error

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Reduce TiDB dependencies (#158)

* utils: exclude mock_cluster outside of unit test

* utils: remove unused ResultSetToStringSlice()

* *: abstract away dependencies of tidb/session into a Glue interface

* *: fix hound lint

* util,mock: move utils.MockCluster to mock.Cluster

* restore: fix test build failure

Co-authored-by: 3pointer <[email protected]>

* go.mod: update tidb (#168)

Signed-off-by: Neil Shen <[email protected]>

* BR support TLS (#161)

* *: support tls

* move tikv.driver to glue

* fix comments

* upgrade golangci and prepare for go 1.14 (#171)

Signed-off-by: Neil Shen <[email protected]>

* backup: add raw backup command (#101)

* backup: add raw backup command

* restore: speed up retry on not leader (#179)

* tests: stable cluster start up

Signed-off-by: Neil Shen <[email protected]>

* tests: fix unbound var

Signed-off-by: Neil Shen <[email protected]>

* restore: speed retry on not leader

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* tests: add --cacert flag

Signed-off-by: Neil Shen <[email protected]>

* make codecov green

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* conn, restore: paginate scan regions (#165)

* conn, restore: paginate scan regions

Signed-off-by: Neil Shen <[email protected]>

* tests: large timeout

Signed-off-by: Neil Shen <[email protected]>

* Batch restore (#167)

* *: unify Range and RangeTree

Signed-off-by: Neil Shen <[email protected]>

* restore: split restore files into small batch

Signed-off-by: Neil Shen <[email protected]>

* task: set default restore concurrency to 128

Signed-off-by: Neil Shen <[email protected]>

* restore: unused table worker pool

Signed-off-by: Neil Shen <[email protected]>

* summary: sum up repeated duration and int

Signed-off-by: Neil Shen <[email protected]>

* rtree: move rtree from utils to pkg

Signed-off-by: Neil Shen <[email protected]>

* README, docker: add quick start (#181)

* README, docker: add quick start

Signed-off-by: Neil Shen <[email protected]>

* cmd: disable some TiDB log

Signed-off-by: Neil Shen <[email protected]>

* docker: build go-ycsb automatically

Signed-off-by: Neil Shen <[email protected]>

* cmd: add TODO about TiDB logs

Signed-off-by: Neil Shen <[email protected]>

* *: update tidb dependency build with go1.14 (#176)

* *: add license header (#182)

* rtree: move checkFile into backup

Signed-off-by: Neil Shen <[email protected]>

* *: add license header

Signed-off-by: Neil Shen <[email protected]>

* Update LICENSE.md

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>
Co-authored-by: 3pointer <[email protected]>

* conn: support not shutting down the storage when closing the connection (#185)

Co-authored-by: 3pointer <[email protected]>

* conn: use GetDomain to avoid some TiDB breaking changes (#186)

* conn: use GetDomain to avoid some TiDB breaking changes

Signed-off-by: Neil Shen <[email protected]>

* minor usability improvement

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* fix check safepoint & unhide experimental features (#175)

* backup: check safepoint for last backup ts

Signed-off-by: 5kbpers <[email protected]>

* check lastbackupts > 0

Signed-off-by: 5kbpers <[email protected]>

* unhide experimental features

Signed-off-by: 5kbpers <[email protected]>

* address comment

Signed-off-by: 5kbpers <[email protected]>

* Update tests/br_z_gc_safepoint/run.sh

Co-Authored-By: kennytm <[email protected]>

Co-authored-by: kennytm <[email protected]>

* support backupts (#172)

* support backupts

* address comment

* address comment

* fix space

* *: update pd deps to v4 (#184)

Co-authored-by: 3pointer <[email protected]>

* restore: support online restore (#114)

Signed-off-by: disksing <[email protected]>

* metrics: add grafana scripts (#140)

* add grafana scripts

* fix

Co-authored-by: 3pointer <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: kennytm <[email protected]>

* filter out all TiFlash nodes when retrieving lists of stores from PD (#187)

* conn: ignore nodes with label engine=tiflash

* conn: disallow TiFlash on restore, only skip TiFlash on backup

* Create integration test for S3 storage (#174)

* Fix summary log (#191)

* *: fix restore summary log after restore logic changed to files

* fix

* fix

* fix

Co-authored-by: kennytm <[email protected]>

* Implement Raw Restore (#104)

* Update kvproto

* Implement raw restore

* fix build

* Set range for file importer

Signed-off-by: MyonKeminta <[email protected]>

* Remove unnecessary comments

Signed-off-by: MyonKeminta <[email protected]>

* check cf and support multi ranges in BackupMeta

Signed-off-by: MyonKeminta <[email protected]>

* Check files' cf; address comments

* adjust structure to keep consistent with master

* Fix build

Signed-off-by: MyonKeminta <[email protected]>

* Fix build and make check, avoid accessing TiDB in rawkv mode

* Fix test

Signed-off-by: MyonKeminta <[email protected]>

* Fix tests

Signed-off-by: MyonKeminta <[email protected]>

* Fix broken logic after merging master

* Update pkg/task/restore_raw.go

Co-Authored-By: Neil Shen <[email protected]>

* Address comments

* Address comments

* Mark raw restore as experimental

* Fix build

* Address comments

* test: Add check for deleting data and partial backup

* Fix build

* Add license header

* fix ci

* fix ci

Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>

* restore: remove tiflash replica before restore (#194)

* restore: remove tiflash replica before restore

Signed-off-by: 5kbpers <[email protected]>

* rename errSplit variable

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* check replica count by region info

Signed-off-by: 5kbpers <[email protected]>

* cleanup

Signed-off-by: 5kbpers <[email protected]>

* save tiflash replica count to backupmeta

Signed-off-by: 5kbpers <[email protected]>

* fix save crcxor

Signed-off-by: 5kbpers <[email protected]>

* fix decode the key of placement rule

Signed-off-by: 5kbpers <[email protected]>

* address lint

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* close domain after restoring tiflash-replica

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* address comments

Signed-off-by: 5kbpers <[email protected]>

* Update pkg/task/restore.go

Co-Authored-By: 3pointer <[email protected]>

Co-authored-by: 3pointer <[email protected]>

* summary: put summary log at last (#197)

* summary: put summary log at last

* fix switch sql

* *: abstract the progress channel (updateCh) into the glue package (#196)

* *: abstract the progress channel (updateCh) into the glue package

* restore: fix crash in truncateTS() when the bound is unlimited

* task: fix comment

Co-authored-by: Ian <[email protected]>

* *: refline logs (#189)

* tests: disable TLS test (#204)

Signed-off-by: Neil Shen <[email protected]>

* *: add S3 quick start and few enhancement of log (#202)

* README, docker: add quick start about S3 storage

Signed-off-by: Neil Shen <[email protected]>

* pkg/summary: make sure to output correct summary

Signed-off-by: Neil Shen <[email protected]>

* cmd, tests: log to terminal if BR_LOG_TO_TERM is set

Signed-off-by: Neil Shen <[email protected]>

* Update pkg/task/common.go

Co-Authored-By: kennytm <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>

* tests: cat log if br fails

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* restore: add error field to `DownloadResponse` (#195)

* restore: add error field to `DownloadResponse`

Signed-off-by: 5kbpers <[email protected]>

* restore: populate restore cancel error (#207)

Signed-off-by: Neil Shen <[email protected]>

Co-authored-by: kennytm <[email protected]>

* enhance usability of br (#208)

* silenceUsage only when parse cmd flags failed

* udpate tidb

Co-authored-by: kennytm <[email protected]>

* task: do not run checksum if restore failed (#209)

* fix incremental bug in llroad test (#199)

* restore: filter same table ddl

* *: do not return error when backup/restore data is empty

* fix create database double during incremental restore

* add tests

* fix ci

* address comment

* add skip create sqls (#211)

* Revert "tests: disable TLS test (#204)" (#218)

This reverts commit e168a60.

* doc: add `minio` to dependence list. (#221)

The README of test omitted `minio` in the dependence list, which is needed for run the integration test.

Co-authored-by: Neil Shen <[email protected]>

* move waiting reject stores in import file (#222)

* move wait rejectstores into import files

* restore: use new table id to search placementRules

* Update pkg/restore/import.go

Co-Authored-By: Neil Shen <[email protected]>

* Update pkg/restore/import.go

Co-Authored-By: kennytm <[email protected]>

* fix ci

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: kennytm <[email protected]>

* Max index length (#220)

* restore: set max-index-length to max

* restore:add max-index-length params

* address comment

* address comment

* glue: create schema/table directly with info (#216)

* glue: create schema/table directly with info

* go.mod: change to use the master version

* gluetidb: fix failure to create schema

* gluetidb: exclude non-public indices when restoring

* go.mod: removed unused replace

Co-authored-by: 3pointer <[email protected]>

Co-authored-by: Neil Shen <[email protected]>
Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: kennytm <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: Ian <[email protected]>
Co-authored-by: Kolbe Kegel <[email protected]>
Co-authored-by: WangXiangUSTC <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
Co-authored-by: pingcap-github-bot <[email protected]>
Co-authored-by: 庄天翼 <[email protected]>
Co-authored-by: 山岚 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants