-
Notifications
You must be signed in to change notification settings - Fork 704
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 race in view iteration #2486
Conversation
As an alternative, would it make sense to invalidate all the children of the database on |
Yeah, that would be a fair change too |
return database.ErrClosed | ||
} | ||
|
||
db.closed.Set(true) | ||
// mark all children as no longer valid because the db has closed | ||
db.invalidateChildrenExcept(nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a unit test for this? Otherwise LGTM
Avoids race when reading view.invalidated or view.db.closed during iteration