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

worker/: fix worker stuck in unitTransWaitCondition(#589) #622

Merged
merged 2 commits into from
Apr 23, 2020

Conversation

lichunzhu
Copy link
Contributor

cherry-pick #589


What problem does this PR solve?

#576
When subtask is started, it will use unitTransWaitCondition to wait for relay log to catch up. But if this task is paused or stopped, we should quit as fast as we can instead of keeping waiting.

What is changed and how it works?

  1. Use st.currCtx to control wait of unitTransWaitCondition.
  2. Use parent context st.ctx and son context st.currCtx to make sure task can be shut down.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick to the release branch

@lichunzhu lichunzhu 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/cherry-pick This PR is just a cherry-pick (backport) labels Apr 21, 2020
@lichunzhu
Copy link
Contributor Author

/run-all-tests

@codecov
Copy link

codecov bot commented Apr 21, 2020

Codecov Report

Merging #622 into release-1.0 will increase coverage by 0.1757%.
The diff coverage is 89.6000%.

@@                 Coverage Diff                 @@
##           release-1.0       #622        +/-   ##
===================================================
+ Coverage      57.6743%   57.8500%   +0.1757%     
===================================================
  Files              166        166                
  Lines            16933      16968        +35     
===================================================
+ Hits              9766       9816        +50     
+ Misses            6219       6203        -16     
- Partials           948        949         +1     

@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC 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 Apr 21, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Apr 23, 2020
@csuzhangxc csuzhangxc added this to the v1.0.5 milestone Apr 23, 2020
@csuzhangxc csuzhangxc added the needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated label Apr 23, 2020
@csuzhangxc csuzhangxc merged commit dd53090 into pingcap:release-1.0 Apr 23, 2020
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-update-release-note The release note is updated. Add this label once the release note is updated 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/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants