Skip to content

Commit

Permalink
Fix data race in TestSeekerManagerCacheShardIndices (#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhall07 authored Sep 29, 2020
1 parent c717d40 commit 192f611
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dbnode/persist/fs/seek_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ func TestSeekerManagerCacheShardIndices(t *testing.T) {
// Assert captured byTime objects match expectations
require.Equal(t, len(shards), len(byTimes))
for _, shard := range shards {
mu.Lock()
byTimes[shard].shard = shard
mu.Unlock()
}

// Assert seeksByShardIdx match expectations
Expand Down

0 comments on commit 192f611

Please sign in to comment.