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

pump: getSafeGCTSOForDrainers should be usable after Close #617

Merged
merged 1 commit into from May 23, 2019

Conversation

suzaku
Copy link
Contributor

@suzaku suzaku commented May 23, 2019

What problem does this PR solve?

When we call Close on the server, it first calls cancel
to stop all related background jobs. If we reuse s.ctx in
getSafeGCTSOForDrainers after Close, nothing useful can be done.

What is changed and how it works?

Make ctx a parameter, so that when calling getSafeGCTSOForDrainers
after Close we can pass in a different context.

Check List

Tests

  • Integration test

Code changes

Side effects

Related changes

When we call `Close` on the server, it first calls `cancel`
to stop all related background jobs. If we reuse `s.ctx` in
`getSafeGCTSOForDrainers` after `Close`, nothing useful can be done.
@suzaku
Copy link
Contributor Author

suzaku commented May 23, 2019

/run-all-tests

@july2993
Copy link
Contributor

LGTM

@suzaku
Copy link
Contributor Author

suzaku commented May 23, 2019

/run-integration-tests

@WangXiangUSTC
Copy link
Contributor

LGTM

@july2993 july2993 merged commit 2aacbe8 into pingcap:master May 23, 2019
@suzaku suzaku deleted the fix-ctx-bug branch May 23, 2019 06:00
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.

None yet

3 participants