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

worker: delete taskState when task is stopped/finished (#1606) #1614

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

ti-srebot
Copy link

@ti-srebot ti-srebot commented Apr 20, 2021

cherry-pick #1606 to release-2.0
You can switch your code base to this Pull Request by using git-extras:

# In dm repo:
git pr https://github.com/pingcap/dm/pull/1614

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/dm.git pr/1614:release-2.0-a557c8b78047

What problem does this PR solve?

fix #1594

What is changed and how it works?

delete taskState when task is stopped/finished

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

When task is running:

dm_worker_cpu_usage 3.528409857613362
# HELP dm_worker_task_state state of task, 0 - invalidStage, 1 - New, 2 - Running, 3 - Paused, 4 - Stopped, 5 - Finished
# TYPE dm_worker_task_state gauge
dm_worker_task_state{source_id="mysql-replica-01",task="testdm"} 2
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary

After task is stopped:

# HELP dm_worker_cpu_usage the cpu usage of worker
# TYPE dm_worker_cpu_usage gauge
dm_worker_cpu_usage 3.521312888533776
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 2.6124e-05
go_gc_duration_seconds{quantile="0.25"} 3.0232e-05

Related changes

  • Need to cherry-pick to the release branch

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added needs-update-docs Should update docs after this PR is merged. Remove this label once the docs are updated needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated size/M type/cherry-pick This PR is just a cherry-pick (backport) labels Apr 20, 2021
@ti-srebot ti-srebot requested review from GMHDBJD and lance6716 April 20, 2021 10:40
@lance6716
Copy link
Collaborator

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lance6716

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 the status/LGT1 One reviewer already commented LGTM label Apr 20, 2021
@lance6716 lance6716 added the require-LGT1 for small PR, LGT1 is enough label Apr 21, 2021
@lance6716
Copy link
Collaborator

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 8368a7b

@ti-chi-bot ti-chi-bot merged commit 22eec08 into pingcap:release-2.0 Apr 21, 2021
@lance6716 lance6716 removed the needs-update-docs Should update docs after this PR is merged. Remove this label once the docs are updated label May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
first-time-contributor needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated require-LGT1 for small PR, LGT1 is enough size/M status/can-merge status/LGT1 One reviewer already commented LGTM type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants