Pass series IDs for shards in DQ instead of all series IDs

pull/2353/head
Jason Wilder 2015-04-17 23:45:49 -06:00
parent e3fcdd2d01
commit 9268ddfefc
1 changed files with 3 additions and 3 deletions

6
tx.go
View File

@ -149,7 +149,7 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri
shards[shard] = append(shards[shard], sid) shards[shard] = append(shards[shard], sid)
} }
for shard, _ := range shards { for shard, sids := range shards {
var mapper influxql.Mapper var mapper influxql.Mapper
// create either a remote or local mapper for this shard // create either a remote or local mapper for this shard
@ -167,7 +167,7 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri
MeasurementName: m.Name, MeasurementName: m.Name,
TMin: tmin.UnixNano(), TMin: tmin.UnixNano(),
TMax: tmax.UnixNano(), TMax: tmax.UnixNano(),
SeriesIDs: t.SeriesIDs, SeriesIDs: sids,
ShardID: shard.ID, ShardID: shard.ID,
WhereFields: whereFields, WhereFields: whereFields,
SelectFields: selectFields, SelectFields: selectFields,
@ -179,7 +179,7 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri
mapper.(*RemoteMapper).SetFilters(t.Filters) mapper.(*RemoteMapper).SetFilters(t.Filters)
} else { } else {
mapper = &LocalMapper{ mapper = &LocalMapper{
seriesIDs: t.SeriesIDs, seriesIDs: sids,
db: shard.store, db: shard.store,
job: job, job: job,
decoder: NewFieldCodec(m), decoder: NewFieldCodec(m),