Skip to content
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

Support replay command to enhance checkpoint #1157

Merged
merged 7 commits into from
Feb 26, 2021

Conversation

lucklove
Copy link
Member

@lucklove lucklove commented Feb 25, 2021

What problem does this PR solve?

In #1069, we support checkpoint, however, the user must guarantee the inpute command is exactly identical with the one before, which is not comfortable.

What is changed and how it works?

Introduce tiup cluster replay and tiup dm replay commands, which need only one argument: the audit id. And we will found the previous command and replay it via the audit id.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 25, 2021
@codecov-io
Copy link

codecov-io commented Feb 25, 2021

Codecov Report

Merging #1157 (a73c32e) into master (f8a7bfa) will decrease coverage by 4.45%.
The diff coverage is 46.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1157      +/-   ##
==========================================
- Coverage   52.32%   47.86%   -4.46%     
==========================================
  Files         286      288       +2     
  Lines       20341    20396      +55     
==========================================
- Hits        10643     9763     -880     
- Misses       8026     8954     +928     
- Partials     1672     1679       +7     
Flag Coverage Δ
cluster 45.03% <57.14%> (+2.01%) ⬆️
dm 25.72% <41.07%> (+0.01%) ⬆️
integrate 47.86% <46.75%> (+1.51%) ⬆️
playground 2.93% <ø> (ø)
tiup 16.36% <0.00%> (-0.04%) ⬇️
unittest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cluster/operation/operation.go 78.26% <ø> (ø)
components/dm/command/replay.go 15.00% <15.00%> (ø)
components/cluster/command/replay.go 45.00% <45.00%> (ø)
pkg/cluster/audit/audit.go 61.11% <60.00%> (-2.36%) ⬇️
pkg/checkpoint/checkpoint.go 70.12% <75.00%> (-8.25%) ⬇️
components/cluster/command/root.go 46.74% <100.00%> (-0.08%) ⬇️
components/dm/command/root.go 56.80% <100.00%> (+0.98%) ⬆️
pkg/logger/audit.go 53.33% <100.00%> (ø)
components/dm/ansible/worker.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-81.25%) ⬇️
... and 63 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 f8a7bfa...d25cfa1. Read the comment docs.

@lucklove lucklove force-pushed the enhanced-checkpoint branch from 313b156 to 7ed712a Compare February 25, 2021 10:08
@lucklove lucklove added this to the v1.4.0 milestone Feb 25, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 25, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 26, 2021
@lucklove lucklove merged commit 9e4dc61 into pingcap:master Feb 26, 2021
@lucklove lucklove deleted the enhanced-checkpoint branch February 26, 2021 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants