Skip to content

Commit

Permalink
fix: protect storage.Stats with a read-lock.
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksezer committed Oct 13, 2022
1 parent c850b93 commit d1a141f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/dmap/fragment.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ type fragment struct {
}

func (f *fragment) Stats() storage.Stats {
f.RLock()
defer f.RUnlock()

return f.storage.Stats()
}

Expand Down

0 comments on commit d1a141f

Please sign in to comment.