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

storage: Use background ctx when rerunning replica consistency check #10625

Merged
merged 1 commit into from
Nov 11, 2016

Conversation

a-robinson
Copy link
Contributor

@a-robinson a-robinson commented Nov 11, 2016

We were previously using a context that got cancelled shortly after
creating the async task, meaning that the async task never really got a
chance to complete successfully.

I'm not sure this is something that particularly needs a test, but the apparent lack of tests related to the consistency check queue is somewhat concerning. Hopefully I just missed them.

Fixes #10613

@petermattis


This change is Reviewable

We were previously using a context that got cancelled shortly after
creating the async task, meaning that the async task never really got a
chance to complete successfully.
@tamird
Copy link
Contributor

tamird commented Nov 11, 2016

How does the context get cancelled shortly after the async task is created? There seems to be a wait group here that should be preventing any deferred cancellation from firing, so there must be a timeout, but I can't find where it is.

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

LGTM

@petermattis
Copy link
Collaborator

How does the context get cancelled shortly after the async task is created?

After RunAsyncTask is called, the code returns from CheckConsistency which returns from replicaConsistencyQueue.process which returns from baseQueue.processReplica which invokes defer cancel().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants