Commit Graph

485 Commits (f5dfb147eef1b267637af3740b19489f36e1f38e)

Author SHA1 Message Date
Paul Dix f5dfb147ee Fix wildcard group by query with time test to be correct. 2015-04-10 16:11:34 -07:00
Paul Dix 4a0c46830e Fix the group by multiple dimensions test to be correct. 2015-04-10 16:11:34 -07:00
Paul Dix 6e8ea9ae91 Fix errors on limits and chunked raw queries. 2015-04-10 16:11:34 -07:00
Paul Dix 113995032e WIP: Initial implementation of remote mapper for distributed queries. 2015-04-10 16:11:34 -07:00
Paul Dix 728f5deb20 uncoment raw ordering test 2015-04-10 16:11:33 -07:00
Paul Dix 2a3ed635ed Add chunked responses and streaming of raw queries.
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
2015-04-10 16:11:33 -07:00
Ben Johnson 3404386a02 Merge pull request #2236 from influxdb/term-signal
Term signal
2015-04-10 17:02:13 -06:00
Ben Johnson eaf4bfca0a Fix term signal.
This commit changes raft so that term changes are made immediately and
term change signals are made afterward. Previously, election timeouts
were invalidated by incoming term changes which caused an election loop.

Stale term was also fixed and http/pprof was added too.
2015-04-10 13:52:20 -06:00
Cory LaNou f6f6323726 Refactor the queryAndWait in the integration tests 2015-04-10 13:22:58 -06:00
Jason Wilder a5e180ca31 Merge pull request #2229 from influxdb/jw-run
Close resources when stopping a node
2015-04-09 22:10:50 -06:00
Jason Wilder 9b2e2bbbc9 Make Node.Close() return error instead of fataling 2015-04-09 20:51:46 -06:00
Jason Wilder 79390d0de6 Remove base port fiddling in server integration test 2015-04-09 20:51:46 -06:00
Jason Wilder 272f855d81 Close snapshot listener when closing a node 2015-04-09 20:51:46 -06:00
Jason Wilder 1494f70786 Close admin server when stopping the node 2015-04-09 20:51:40 -06:00
Cory LaNou 14042e31b9 Merge pull request #2214 from n1tr0g/exec_cmd
Added the option to influx CLI to execute single command and exit.
2015-04-09 13:16:51 -06:00
David Norton 25cea58635 refactor scanning & parsing of identifiers 2015-04-09 13:21:13 -04:00
Jason Wilder 73bd5847b0 Close the cluster listener when closing a node
These were never closed which causes some port dancing issues
in the tests
2015-04-09 09:54:42 -06:00
Jason Wilder cec866dee0 Ensure test cluster nodes are closed 2015-04-09 09:47:21 -06:00
Jason Wilder b7f47e1630 Return the Node from RunCommand 2015-04-09 09:44:44 -06:00
Dejan Golja 0f7e3d259b Added the option to influx CLI to execute single command and exit.
Helpful when scripting and automating installs
2015-04-10 00:27:57 +10:00
Jason Wilder 94f9ad0624 Fix unable to join race
2015/04/08 22:27:01 no broker or server configured to handle messaging endpoints
2015/04/08 22:27:02 join: failed to connect data node: http://box296:9012: unable to join
2015/04/08 22:27:02 join: failed to connect data node to any specified server

There is a race when joining a data only node to a broker and another data only node between the
data node heartbeater and the join operation.  If the heartbeater
fire before the join attempt, it's possible for the booting data node
to be selected as the first data node for redirection by the broker.
The join attempt would request a data node endpoint on the broker "/data_nodes"
but since the broker cannot handle it, it would redirect to a valid broker.

During this race, the broker would redirect the request back to the same server.  If
this happens, the data node would get stuck and not be able to join because it's
still booting.

To work around this, the redirect is randonmized and the join calls will not attempt
to call itself and instead re-request the original URL.  A better fix might be to
not start the heartbeater until after the datanode has joined or initialized.
2015-04-08 20:50:24 -06:00
Jason Wilder d6d12f2342 Fix erroneous logging for http handlers 2015-04-08 20:50:24 -06:00
Jason Wilder 0dbf66e2fe Cleanup join logic and logging
Make it more explicit when existing cluster state is being used
versus join URLs.  Also consolidate some duplicated `if index==0`
checks.
2015-04-08 20:49:58 -06:00
Jason Wilder 59a80fb7be Simplify data node join urls
If the node is running a broker and a data node, always have the
data node client connect to the local broker since it will already
be initialized or joined.
2015-04-08 20:49:58 -06:00
Jason Wilder a612b8a0f6 Bring back Initialization.JoinURLs config option
Removing this option causes issues when deploying influxd
via configuration management. We can now define the same
set of join URLs in the config file across nodes.

This also ensures that the `-flag` option overrides the
config file setting if passed.
2015-04-08 20:49:58 -06:00
Cory LaNou ed05cadf35 move where we enable continous queries when starting up 2015-04-08 15:43:09 -06:00
Cory LaNou 65184aabc4 enable continuous query 2015-04-08 12:25:04 -06:00
Jason Wilder d8342ef281 Exit all queryAndWait goroutines when returning
The timeout goroutine would continue to run (until the timeout)
even after queryAndWait returned.  This causes thousands of extra
goroutines to linger around and makes the test stack traces very
difficult to read.
2015-04-08 10:34:00 -06:00
Jason Wilder be10db87d2 Ensure broker and data nodes are enabled by default
NewTestConfig() would enable broker and data nodes so running
influxd w/o a config file would start the nodes.  If you ran
influxd w/ a config file but did not explicitly set Data.Enabled
or Broker.Enabled, the server would not start.  This is not
intuitive when moving to a config file setup.

Instead, broker and data are enabled w/ the config file (like w/o)
and they must be explicitly disabled to run in a data or broker
only mode. This will help w/ backwards compatibility with existing
config files.
2015-04-07 12:17:34 -06:00
Jason Wilder 2b502858dc Prevent starting server if both broker and data are disabled
Not a valid configuration so print the error and some suggestions
to fix it.
2015-04-07 12:17:28 -06:00
Paul Dix a72707bdbc Merge pull request #2175 from influxdb/data-broker-1934
Separate broker and data nodes
2015-04-07 11:33:39 -04:00
Jason Wilder 9e109e847b Fix typos in comments 2015-04-06 21:39:18 -06:00
Mark Rushakoff 48b3986579 Merge pull request #2176 from influxdb/consistent-usage-printing
Use fmt.Println, not log.Println to print usage
2015-04-06 15:55:21 -07:00
Jason Wilder 01c2de62b0 Rename Server to Node
Server is very overloaded currently so use Node to represent the
container that holds onto a broker and data node (server currently)
2015-04-06 16:38:01 -06:00
Jason Wilder 54821538d1 Ignore join urls if restarting a node
If a node is restarted and it had already joined the cluster,
ignore and log that the join urls are being ignored and existing
cluster state will be used.
2015-04-06 16:38:01 -06:00
Jason Wilder aa5696c10d Handle server unavailable response
When starting multiple servers concurrently, they can race to connect
to each other.  This change just has the join attempts retry to make
cluster setup easier.
2015-04-06 16:38:01 -06:00
Jason Wilder 01ee3fe352 Re-enable 3 node test 2015-04-06 16:38:01 -06:00
Jason Wilder 8b5307f6e8 Remove all join URLs from config
This removes all join URLs from the config.  To join a node to a
cluster, the URL of another member of the cluster should be passed
on the command line w/ the -join flag.  The join URLs can now be
any node regardless of whether the node is a broker only or data
only node.  At join time, the receiving node will redirect the
request to a valid broker or data node if it cannot handle the request
itself.
2015-04-06 16:38:01 -06:00
Jason Wilder 9af362bff5 Rename DataAddrUDP to APIAddrUDP 2015-04-06 16:38:00 -06:00
Jason Wilder d06c4ead5c Replace broker url w/ cluster url 2015-04-06 16:38:00 -06:00
Jason Wilder 5e3c26a636 Replace data port w/ cluster port 2015-04-06 16:38:00 -06:00
Jason Wilder b85eba550d Separate cluster and API endpoints 2015-04-06 16:38:00 -06:00
Jason Wilder 4a7cae4391 Replace broker port w/ cluster port 2015-04-06 16:38:00 -06:00
Jason Wilder 23819d10d2 Add Cluster port
This is the port that all cluster communication will take place
over.  It will replace the separate data and broker ports.
2015-04-06 16:38:00 -06:00
Jason Wilder 73f6f8cb44 Remove unused cluster config section 2015-04-06 16:38:00 -06:00
Jason Wilder 8ff4b51063 Temporarily disable 3 node server test
How a cluster is setup has changed and this test is failing w/
panic: assert failed: invalid initial server id: 2 [recovered]

There is an existing multi-node test w/ a broker and two data
nodes so we're still covering this case and will need to come
back to it.
2015-04-06 16:38:00 -06:00
Jason Wilder 60c66c8515 Add data node join URLs
To add a new data node, it currently needs a broker
and another data node to join.  Temporarily adding
a JoinURLs option to the Data node section so a
standalone data node can be created but the intent is
that this will be removed.

Ideally, the the joinURL could point to either a data node
or a broker and it would get the required URLs from that
host but that is not possible currently.
2015-04-06 16:38:00 -06:00
Jason Wilder 5d6536f693 First pass at separate data and broker nodes
Adds a simple test to start a separate broker and
data node.  Data nodes still need a separate set
join URLs which is not in place yet.
2015-04-06 16:38:00 -06:00
Jason Wilder 388b1c2c05 Refactor openServer/openBroker
Simplified signature and state now depends on indexes vs directory
existence
2015-04-06 16:38:00 -06:00
Jason Wilder 6fa0ea01dd Move openBroker to RunCommand.openBroker 2015-04-06 16:38:00 -06:00