Fixes#2272
There was previously a explict panic put in the query engine to prevent
queries where the number of shards was not equal to the number of data nodes
in the cluster. This was waiting for the distributed queries branch to land
but was not removed when that landed.
Adds a Balancer interface to allow RemoteMappers to send data node
requests to multiple nodes. It also provides the ability to failed
requests to mark the data node as offline using exponential
backoff with a 5 min max wait time.
Fixes#2242
This can happen, though is very unlikely. If this node receives encoded
data, to be written to disk, and is queried for that data before its
metastore is updated, there will be no field mapping for the data during
decode. All this can happen because data is encoded by the node that first
received the write request, not the node that actually writes the data to
disk. So if this happens, skip the data.
Refactored query engine to have different processing pipeline for raw queries. This enables queries that have a large offset to not keep everything in memory. It also makes it so that queries against raw data that have a limit will only p
rocess up to that limit and then bail out.
Raw data queries will only read up to a certain point in the map phase before yielding to the engine for further processing.
Fixes#2029 and fixes#2030
This fixes all "golint" warnings in the top-level "influxdb" package:
database.go:316:2: can probably use "var tagStrings []string" instead
database.go:1077:6: exported type RetentionPolicies should have comment or be unexported
server.go:337:1: exported method Server.StartSelfMonitoring should have comment or be unexported
server.go:345:3: can probably use "var points []Point" instead
server.go:433:2: can probably use "var groups []group" instead
server.go:498:2: can probably use "var groups []group" instead
server.go:1417:1: comment on exported method Server.CreateRetentionPolicyIfNotExists should be of the form "CreateRetentionPolicyIfNotExists ..."
server.go:1899:1: exported method Server.DropMeasurement should have comment or be unexported
server.go:2153:10: if block ends with a return statement, so drop this else and outdent its block
server.go:2695:2: can probably use "var rows []*influxql.Row" instead
server.go:2876:11: if block ends with a return statement, so drop this else and outdent its block
server.go:3804:1: exported method Server.StartReportingLoop should have comment or be unexported
tx.go:133:4: can probably use "var mappers []influxql.Mapper" instead
tx.go:231:1: exported method LocalMapper.Open should have comment or be unexported
tx.go:254:1: exported method LocalMapper.Close should have comment or be unexported
tx.go:348:1: exported method LocalMapper.Next should have comment or be unexported