From 9268ddfefc48ba4eae1fc56861651b7616839529 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Fri, 17 Apr 2015 23:45:49 -0600 Subject: [PATCH] Pass series IDs for shards in DQ instead of all series IDs --- tx.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tx.go b/tx.go index d6db631616..2d61ce890e 100644 --- a/tx.go +++ b/tx.go @@ -149,7 +149,7 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri shards[shard] = append(shards[shard], sid) } - for shard, _ := range shards { + for shard, sids := range shards { var mapper influxql.Mapper // 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, TMin: tmin.UnixNano(), TMax: tmax.UnixNano(), - SeriesIDs: t.SeriesIDs, + SeriesIDs: sids, ShardID: shard.ID, WhereFields: whereFields, SelectFields: selectFields, @@ -179,7 +179,7 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri mapper.(*RemoteMapper).SetFilters(t.Filters) } else { mapper = &LocalMapper{ - seriesIDs: t.SeriesIDs, + seriesIDs: sids, db: shard.store, job: job, decoder: NewFieldCodec(m),