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

closedts/transport: avoid race when using stopper.RunWorker #28903

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

benesch
Copy link
Contributor

@benesch benesch commented Aug 21, 2018

Stopper.RunWorker cannot be called in code which can run concurrently
with Stopper.Stop. Use Stopper.RunAsyncTask instead.

Fix #28755.

Release note: None

Stopper.RunWorker cannot be called in code which can run concurrently
with Stopper.Stop. Use Stopper.RunAsyncTask instead.

Fix cockroachdb#28755.

Release note: None
@benesch benesch requested review from tbg and a team August 21, 2018 16:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

:lgtm: thanks! There's also the option of running the worker in a task, but it's nasty.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@benesch
Copy link
Contributor Author

benesch commented Aug 21, 2018

bors r=tschottdorf

craig bot pushed a commit that referenced this pull request Aug 21, 2018
27848: sql: quantize the statement counts reported to the reg server r=knz a=knz

Fixes #25114.

This preserves every count smaller than 10, then for larger values
bucket into buckets that are powers of 10.

Release note (sql change): CockroachDB now hides more information from
the statement statistics reported to Cockroach Labs.

28793: storage: update the tscache appropriately after a merge r=tschottdorf a=benesch

@nvanbenschoten I figured this was in your wheelhouse but feel free to defer the review to @tschottdorf!

---

When applying a merge, teach the leaseholder of the LHS range to update
its timestamp cache for the keyspace previously owned by the RHS range
appropriately.

Release note: None

28903: closedts/transport: avoid race when using stopper.RunWorker r=tschottdorf a=benesch

Stopper.RunWorker cannot be called in code which can run concurrently
with Stopper.Stop. Use Stopper.RunAsyncTask instead.

Fix #28755.

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
Co-authored-by: Nikhil Benesch <[email protected]>
@craig
Copy link
Contributor

craig bot commented Aug 21, 2018

Build succeeded

@craig craig bot merged commit ffa957f into cockroachdb:master Aug 21, 2018
@benesch benesch deleted the closedts-stopper-race branch August 21, 2018 21:08
craig bot pushed a commit that referenced this pull request Aug 27, 2018
29125: backport-2.1: closedts/transport: avoid race when using stopper.RunWorker r=tschottdorf a=benesch

Backport 1/1 commits from #28903.

/cc @cockroachdb/release

---

Stopper.RunWorker cannot be called in code which can run concurrently
with Stopper.Stop. Use Stopper.RunAsyncTask instead.

Fix #28755.

Release note: None


Co-authored-by: Nikhil Benesch <[email protected]>
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