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

Pick up coreos/etcd#8689 #27998

Merged
merged 1 commit into from
Jul 30, 2018

Conversation

nvanbenschoten
Copy link
Member

This picks up etcd-io/etcd#8689.

Release note: None

This picks up etcd-io/etcd#8689.

Release note: None
@nvanbenschoten nvanbenschoten requested review from tbg and a team July 28, 2018 02:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg
Copy link
Member

tbg commented Jul 28, 2018

Nice, LGTM

@nvanbenschoten
Copy link
Member Author

TFTR.

bors r+

craig bot pushed a commit that referenced this pull request Jul 30, 2018
27998: Pick up etcd-io/etcd#8689 r=nvanbenschoten a=nvanbenschoten

This picks up etcd-io/etcd#8689.

Release note: None

28002: storage: avoid double lock in tryGetOrCreateReplica r=nvanbenschoten a=nvanbenschoten

Before this change, `tryGetOrCreateReplica` was RLocking, checking
an uncommon condition, then Locking. This was unnecessary and made
the code look strange. It also resulted in an extra RLock in the
exceptionally common case where the Replica was not destroyed.

This change fixes this by collapsing the destroyStatus check into
the main critical section. There's no real expected performance
improvement here, this is mostly just for cleaner code.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jul 30, 2018

Build succeeded

@craig craig bot merged commit 0946414 into cockroachdb:master Jul 30, 2018
@nvanbenschoten nvanbenschoten deleted the nvanbenschoten/pickUpRaft branch July 31, 2018 19:24
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