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

cherry-pick master to release 4.0#250

Merged
kennytm merged 11 commits intopingcap:release-4.0from
3pointer:release-4.0
Apr 26, 2020
Merged

cherry-pick master to release 4.0#250
kennytm merged 11 commits intopingcap:release-4.0from
3pointer:release-4.0

Conversation

@3pointer
Copy link
Collaborator

@3pointer 3pointer commented Apr 26, 2020

What problem does this PR solve?

cherry-pick master recent changes to release-4.0 except #233 , because TiKV 4.0.0-rc.1 didn't merge tikv/tikv#7632

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test

3pointer and others added 9 commits April 26, 2020 10:56
* enable tidb config by default
* backup,restore: work on progress to fix a bug that causes --checksum flag won't work properly.

Some code of backup and restore ignored the flag (a.k.a. config.Checksum), so when checksum is disabled, we will face failure.

* backup: backup will report total bytes and kvs when checksums check disabled.

Some code of backup and restore ignored the flag (a.k.a. config.Checksum), so when checksum is disabled, we will face failure.

* backup: backup will report total bytes and kvs when checksums check disabled.

Some code of backup and restore ignored the flag (a.k.a. config.Checksum), so when checksum is disabled, we will face failure.

* backup: add log to ChecksumMatches and new version of FastChecksum.

Some of log has been lose. They are in ChecksumMatches now.

* restore: restore could find non-checksum tables and skip them automatically.

for backup, ChecksumMatches returns error now.

* misc: add document for Table::NoChecksum.

* backup: omit checksum progress bar when user specify `--checksum=false`.

* backup: `CopyMetaFrom` overrides original `client.Schemes` instead of append at its end.

* backup: refactor about checksum logic, fix a bug.

the bug would cause: when multi tables are backup, the metadata contains only one table.

* backup: do some lints.

* backup,restore: do some refactor so that cyclomatic complexity won't be too large.

* misc: don't use underscore on receiver.

* backup: print "quick checksum success" message per table.

...to make br_full_index happy!

* backup: refactor a MinInt pattern.

* backup: Apply suggestions from code review

Co-Authored-By: kennytm <kennytm@gmail.com>

Co-authored-by: 3pointer <luancheng@pingcap.com>
Co-authored-by: kennytm <kennytm@gmail.com>
* create with info during incremental restore

* add test

* fix log

* address comment

* fix ci

* address commemnt
* redirect kvproto

Signed-off-by: Yi Wu <yiwu@pingcap.com>

* pass sse_kms_key_id

Signed-off-by: Yi Wu <yiwu@pingcap.com>

* fix hound

Signed-off-by: Yi Wu <yiwu@pingcap.com>

* update kvproto

Signed-off-by: Yi Wu <yiwu@pingcap.com>

* go mod tidy

Signed-off-by: Yi Wu <yiwu@pingcap.com>

Co-authored-by: kennytm <kennytm@gmail.com>
@3pointer 3pointer changed the title merge master to release 4.0 cherry-pick master to release 4.0 Apr 26, 2020
@codecov
Copy link

codecov bot commented Apr 26, 2020

Codecov Report

Merging #250 into release-4.0 will increase coverage by 0.29%.
The diff coverage is 72.43%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0     #250      +/-   ##
===============================================
+ Coverage        70.13%   70.43%   +0.29%     
===============================================
  Files               47       48       +1     
  Lines             4705     4817     +112     
===============================================
+ Hits              3300     3393      +93     
- Misses             966      978      +12     
- Partials           439      446       +7     
Impacted Files Coverage Δ
pkg/backup/schema.go 82.60% <ø> (+3.94%) ⬆️
pkg/backup/client.go 71.21% <58.18%> (+0.48%) ⬆️
pkg/restore/db.go 54.48% <58.82%> (+0.21%) ⬆️
pkg/storage/s3.go 85.52% <63.63%> (-1.98%) ⬇️
pkg/task/backup.go 60.99% <70.00%> (+1.45%) ⬆️
pkg/storage/parse.go 87.65% <84.61%> (-0.11%) ⬇️
pkg/task/restore.go 54.15% <90.00%> (+1.53%) ⬆️
cmd/cmd.go 66.17% <100.00%> (ø)
pkg/restore/client.go 69.94% <100.00%> (+0.35%) ⬆️
pkg/utils/math.go 100.00% <100.00%> (ø)
... and 2 more

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 69444ab...24f28ef. Read the comment docs.

@3pointer 3pointer requested review from kennytm and overvenus April 26, 2020 03:30
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.

Rest LGTM

Co-Authored-By: Neil Shen <overvenus@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants