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

*: fix invalid access to backend struct #5144

Merged
merged 2 commits into from
Apr 21, 2016
Merged

*: fix invalid access to backend struct #5144

merged 2 commits into from
Apr 21, 2016

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Apr 20, 2016

Fix #5142

@@ -160,6 +160,8 @@ func (t *batchTx) commit(stop bool) {
// commit the last tx
if t.tx != nil {
if t.pending == 0 && !stop {
b.mu.RLock()
Copy link
Contributor

Choose a reason for hiding this comment

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

does this compile? t.backend.mu...?

@xiang90
Copy link
Contributor Author

xiang90 commented Apr 20, 2016

@gyuho Sorry! Will fix.

@gyuho
Copy link
Contributor

gyuho commented Apr 20, 2016

Thanks. LGTM after that. Defer to @heyitsanthony

@heyitsanthony
Copy link
Contributor

lgtm

@xiang90
Copy link
Contributor Author

xiang90 commented Apr 20, 2016

This is actually still broken... I will try more...

@xiang90
Copy link
Contributor Author

xiang90 commented Apr 21, 2016

All fixed. PTAL. /cc @heyitsanthony

@heyitsanthony
Copy link
Contributor

@xiang90 seems like it's deadlocking on the reader lock now?

@xiang90
Copy link
Contributor Author

xiang90 commented Apr 21, 2016

@heyitsanthony Whoops... Forgot to check in the changes in backend.go. Now fixed.

@heyitsanthony
Copy link
Contributor

lgtm after fixing the commit titles

@xiang90 xiang90 changed the title backend: getting lock before accessing db *: fix invalid access to backend struct Apr 21, 2016
@xiang90 xiang90 merged commit 4e175a9 into etcd-io:master Apr 21, 2016
@xiang90 xiang90 deleted the l branch April 21, 2016 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants