Skip to content

Commit d1a141f

Browse files
committed
fix: protect storage.Stats with a read-lock.
1 parent c850b93 commit d1a141f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/dmap/fragment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ type fragment struct {
3737
}
3838

3939
func (f *fragment) Stats() storage.Stats {
40+
f.RLock()
41+
defer f.RUnlock()
42+
4043
return f.storage.Stats()
4144
}
4245

0 commit comments

Comments
 (0)