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

[SeiDB] Fix concurrent map access #411

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions storev2/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@
if version <= 0 || (rs.lastCommitInfo != nil && version == rs.lastCommitInfo.Version) {
return rs.CacheMultiStore(), nil
}
rs.mtx.RLock()
defer rs.mtx.RUnlock()

Check warning on line 241 in storev2/rootmulti/store.go

View check run for this annotation

Codecov / codecov/patch

storev2/rootmulti/store.go#L240-L241

Added lines #L240 - L241 were not covered by tests
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
stores := make(map[types.StoreKey]types.CacheWrapper)
// add the transient/mem stores registered in current app.
for k, store := range rs.ckvStores {
Expand Down
Loading