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

possible race condition in connection pool #91

Open
burner-account opened this issue Apr 6, 2019 · 0 comments
Open

possible race condition in connection pool #91

burner-account opened this issue Apr 6, 2019 · 0 comments

Comments

@burner-account
Copy link

see conn_pool.go
see connectionPool
see connectionPool --> connCount
see func (cp *connectionPool) connCloser()

You are using connCloser() as a go routine.
Inside connCloser there is the assignment
connCount = cp.connCount

Please consider using
connCount = atomic.LoadUint64(&cp.connCount)
instead, as the current solution might lead to race conditions.

I am not using/invested in couchbase, so please forgive the bad report style.

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

No branches or pull requests

1 participant