Performance optimization suggestions
parent
ff070313ed
commit
f82d53f75d
|
@ -1066,6 +1066,7 @@ func (i *Index) assignExistingSeries(shardID uint64, seriesIDSet *tsdb.SeriesIDS
|
|||
} else {
|
||||
// Add the existing series to this shard's bitset, since this may
|
||||
// be the first time the series is added to this shard.
|
||||
if !seriesIDSet.Contains(ss.ID) {
|
||||
seriesIDSet.Lock()
|
||||
if !seriesIDSet.ContainsNoLock(ss.ID) {
|
||||
seriesIDSet.AddNoLock(ss.ID)
|
||||
|
@ -1073,6 +1074,7 @@ func (i *Index) assignExistingSeries(shardID uint64, seriesIDSet *tsdb.SeriesIDS
|
|||
seriesIDSet.Unlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
i.mu.RUnlock()
|
||||
return keys[:n], names[:n], tagsSlice[:n]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue