Skip to content

Solved data races in pkg/registry#306

Merged
lavalamp merged 2 commits intokubernetes:masterfrom
monnand:registry-race
Jun 30, 2014
Merged

Solved data races in pkg/registry#306
lavalamp merged 2 commits intokubernetes:masterfrom
monnand:registry-race

Conversation

@monnand
Copy link
Copy Markdown
Contributor

@monnand monnand commented Jun 30, 2014

The old version has a data race detected by go test -race.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe just a regular mutex? Or at least switch to using write locks for create/update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems that we did not change any member's value in create/update, so I used R(un)lock(). Anyway, I changed to Mutex now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Haha, good point. Still, might as well be future-proof.

@monnand
Copy link
Copy Markdown
Contributor Author

monnand commented Jun 30, 2014

Changed to mutex. PTAL.

@lavalamp
Copy link
Copy Markdown
Contributor

LGTM

@monnand
Copy link
Copy Markdown
Contributor Author

monnand commented Jun 30, 2014

Thank you, @lavalamp.

@monnand
Copy link
Copy Markdown
Contributor Author

monnand commented Jun 30, 2014

Good to merge?

lavalamp added a commit that referenced this pull request Jun 30, 2014
Solved data races in pkg/registry
@lavalamp lavalamp merged commit 655bca7 into kubernetes:master Jun 30, 2014
@lavalamp
Copy link
Copy Markdown
Contributor

Ah, just double checking our shiney new policy. I think this counts as a "small" change not needing to LGTMs. :)

@monnand monnand deleted the registry-race branch June 30, 2014 19:15
@monnand
Copy link
Copy Markdown
Contributor Author

monnand commented Jun 30, 2014

Thank you!

vishh pushed a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
This should make us more robust in the face of failure (at the cost of
making the failures less prominent). We allow GetStats() to return an
error and a partial result. We will process the result and report the
error.

Fixes kubernetes#306.
keontang pushed a commit to keontang/kubernetes that referenced this pull request May 14, 2016
Remove kube-up complete report to executor
keontang pushed a commit to keontang/kubernetes that referenced this pull request Jul 1, 2016
Remove kube-up complete report to executor
harryge00 pushed a commit to harryge00/kubernetes that referenced this pull request Aug 11, 2016
Remove kube-up complete report to executor
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Dec 8, 2016
mqliang pushed a commit to mqliang/kubernetes that referenced this pull request Mar 3, 2017
seans3 pushed a commit to seans3/kubernetes that referenced this pull request Apr 10, 2019
Initial incomplete release notes draft for 1.7
sttts pushed a commit to sttts/kubernetes that referenced this pull request Aug 6, 2020
UPSTREAM: 93658: test/e2e: fail test rather than flooding logs if PVC watch is closed prematurely
b3atlesfan pushed a commit to b3atlesfan/kubernetes that referenced this pull request Feb 5, 2021
etcd node and error return handling fixups
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.

2 participants