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

fix pump pull pop bug while closing pump #745

Merged
merged 2 commits into from
Sep 5, 2019

Conversation

lichunzhu
Copy link
Contributor

What problem does this PR solve?

cherry-pick of #739
When we try to close pump server, we will cancel s.ctx first. But we wish that storage will pull storaged binlogs until drainer receives them. Then pump can safely quit. But if we use s.ctx for storage.PullCommitBinlog it will quit at first and drainer may no longer receive binlog from this pump.

What is changed and how it works?

Change s.ctx to context.Background() and add s.pullClose channel to control the closure of PullBinlogs. Run close(s.pullClose) after commitStatus.

Check List

Tests

  • Unit test
  • Integration test

Code changes

Side effects

Related changes

@lichunzhu
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@july2993 july2993 left a comment

Choose a reason for hiding this comment

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

LGMT

Copy link
Contributor

@suzaku suzaku left a comment

Choose a reason for hiding this comment

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

LGTM

@july2993 july2993 merged commit 07ba123 into pingcap:master Sep 5, 2019
@lichunzhu lichunzhu deleted the czli/fixPumpPullPop branch September 5, 2019 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants