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

loader: fix load progress #89

Merged
merged 1 commit into from
Mar 23, 2019
Merged

Conversation

csuzhangxc
Copy link
Member

What problem does this PR solve?

if we pause/resume task when loading, the progress may show an incorrect value. It's because we forgot to reset totalDataSize/finishedDataSize when resuming.

What is changed and how it works?

reset totalDataSize/finishedDataSize when resuming.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    • pause-task when loading
    • resume-task
    • observe finishedBytes/totalBytes/progress in query-status's output

@csuzhangxc csuzhangxc added priority/normal Minor change, requires approval from ≥1 primary reviewer status/PTAL This PR is ready for review. Add this label back after committing new changes type/bug-fix Bug fix type/qa relate to quality assurance labels Mar 22, 2019
Copy link
Contributor

@amyangfei amyangfei left a comment

Choose a reason for hiding this comment

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

Maybe we can add an integration test to simulate load process interrupt and restore later. Besides adding test to some status function for each unit is work in progress.
LGTM

@amyangfei amyangfei added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Mar 22, 2019
@csuzhangxc
Copy link
Member Author

Besides adding test to some status function for each unit is work in progress.

cool!

@csuzhangxc
Copy link
Member Author

@kennytm PTAL

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM

@kennytm kennytm added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Mar 22, 2019
@csuzhangxc csuzhangxc merged commit a8e91c0 into pingcap:master Mar 23, 2019
@csuzhangxc csuzhangxc deleted the fix-load-percent branch March 23, 2019 02:15
lichunzhu pushed a commit to lichunzhu/dm that referenced this pull request Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge type/bug-fix Bug fix type/qa relate to quality assurance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants