Fix in-mem index integration tests.

pull/7913/head
Ben Johnson 2016-12-07 08:56:57 -07:00
parent 183418dcbd
commit 83e80f6d0b
No known key found for this signature in database
GPG Key ID: 81741CD251883081
2 changed files with 12 additions and 1 deletions

View File

@ -13,7 +13,7 @@ const (
DefaultEngine = "tsm1"
// DefaultIndex is the default index for new shards
DefaultIndex = "tsi1" // "inmem"
DefaultIndex = "inmem"
// tsdb/engine/wal configuration options

View File

@ -256,6 +256,17 @@ func (i *Index) TagsForSeries(key string) (models.Tags, error) {
func (i *Index) MeasurementNamesByExpr(expr influxql.Expr) ([][]byte, error) {
i.mu.RLock()
defer i.mu.RUnlock()
// Return all measurement names if no expression is provided.
if expr == nil {
a := make([][]byte, 0, len(i.measurements))
for name := range i.measurements {
a = append(a, []byte(name))
}
bytesutil.Sort(a)
return a, nil
}
return i.measurementNamesByExpr(expr)
}