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

progress: removed the progress struct (#561)#564

Merged
3pointer merged 3 commits intopingcap:release-4.0from
ti-srebot:release-4.0-d583a635bdaf
Oct 23, 2020
Merged

progress: removed the progress struct (#561)#564
3pointer merged 3 commits intopingcap:release-4.0from
ti-srebot:release-4.0-d583a635bdaf

Conversation

@ti-srebot
Copy link
Contributor

cherry-pick #561 to release-4.0


What problem does this PR solve?

remove the progress struct.
This struct was error-prone(It has multi send-part but only close once, hence may leading tosend on closed channel), hence we embedded its function to an atomic integer in ProgressPrinter.

What is changed and how it works?

Remove the struct glue.progress, implement glue.Progress for ProgressPrinter directly.
This may cause the progress value won't immediately be added when calling Inc. But we update the progress status by polling the progress every second, it would be ok to not react immediately.

Check List

Tests

  • Unit test

Release Note

  • No release note.

@YuJuncen
Copy link
Collaborator

/build

cannot use db (variable of type *model.DBInfo) as *model.DBInfo value 😕

@YuJuncen
Copy link
Collaborator

/run-integration-test

Copy link
Collaborator

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 LGTM1 label Oct 23, 2020
@glorv
Copy link
Collaborator

glorv commented Oct 23, 2020

LGTM

@ti-srebot ti-srebot added status/LGT2 LGTM2 and removed status/LGT1 LGTM1 labels Oct 23, 2020
@3pointer 3pointer merged commit cdac9b1 into pingcap:release-4.0 Oct 23, 2020
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.

4 participants