-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Bug in iavlIterator.Close() can cause race condition (store/iavl/store.go) #5276
Comments
Alternatively, can't we send on a "done" channel in |
Yes, I believe your method can also work. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of Bug
In store/iavl/store.go, the implementation of "func (iter *iavlIterator) Close()" does not wait iterateRoutine to fully exit. So, after Close() returns, iterateRoutine can still run for a while, which may cause race condition.
Version
v0.37.4
Steps to Reproduce
Hard to reproduce, since it is a race condition. In our not-opensourced-yet project, we occasionally meet this bug.
The following code can fix this bug:
For Admin Use
The text was updated successfully, but these errors were encountered: