Skip to content

Commit e8ef25b

Browse files
fix: add locking in ClearBadShardList (#26423) (#26831)
Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
1 parent 31b41a6 commit e8ef25b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tsdb/store.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@ func (s *Store) ClearBadShardList() map[uint64]error {
786786
badShards := s.GetBadShardList()
787787

788788
s.mu.Lock()
789+
s.badShards.mu.Lock()
790+
defer s.badShards.mu.Unlock()
789791
defer s.mu.Unlock()
790792
clear(s.badShards.shardErrors)
791793

0 commit comments

Comments
 (0)