fix(tsdb): copy measurement names when expression is provided
We already make copies when no expression is provided, because the backing slices may go away if the shard they came from is closed. This fixes the other spot where some backing slices would be returned.pull/10431/head
parent
04975c46ef
commit
5c2d36225d
|
@ -1296,7 +1296,11 @@ func (is IndexSet) MeasurementNamesByExpr(auth query.Authorizer, expr influxql.E
|
|||
|
||||
// Return filtered list if expression exists.
|
||||
if expr != nil {
|
||||
return is.measurementNamesByExpr(auth, expr)
|
||||
names, err := is.measurementNamesByExpr(auth, expr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return slices.CopyChunkedByteSlices(names, 1000), nil
|
||||
}
|
||||
|
||||
itr, err := is.measurementIterator()
|
||||
|
|
Loading…
Reference in New Issue