Commit Graph

689 Commits (c9906d8777e89ebc467600a99a498e210283e398)

Author SHA1 Message Date
Jason Wilder 406a951718 Fix comments 2015-04-21 13:39:58 -06:00
Jason Wilder 90e3059a8b Fix processRawQuery from returning duplicate data 2015-04-21 13:39:58 -06:00
Jason Wilder f5a8227077 Fix cluster join
New data nodes would never actually join the cluster.  They would
pose as server ID 1 in a cluster.
2015-04-21 13:39:58 -06:00
Jason Wilder 94f50ac056 Make 3 node failover test parallel 2015-04-20 09:24:56 -06:00
Jason Wilder fd4a69855d Re-enable Test3NodeClusterPartiallyReplicated 2015-04-20 09:24:56 -06:00
Jason Wilder d8fba0a50d Close raft log before broker
Closing the broker before the raft log can trigger this panic since the
raft log depends on the broker via the FSM.

panic: apply: broker apply: broker already closed

goroutine 29164 [running]:
github.com/influxdb/influxdb/raft.(*Log).applier(0xc20833b040, 0xc20802bd40)
	/Users/jason/go/src/github.com/influxdb/influxdb/raft/log.go:1386 +0x278
created by github.com/influxdb/influxdb/raft.func·002
	/Users/jason/go/src/github.com/influxdb/influxdb/raft/log.go:389 +0x764
2015-04-20 09:23:39 -06:00
David Norton a1790f2d0c fix #2337: panic if tag key isn't double quoted 2015-04-18 13:05:41 -04:00
Philip O'Toole 4a1df4c45a Reduce test timeout for graphite and openTSDB 2015-04-18 09:53:54 -07:00
Philip O'Toole 12724ccc9c Remove debug cruft from tests 2015-04-17 18:46:10 -07:00
Philip O'Toole bc9a0b8ad6 Dump cluster diags if table-tests fail 2015-04-17 18:33:26 -07:00
Philip O'Toole 4c7e3632b9 Disable partial replication test 2015-04-17 18:33:22 -07:00
Philip O'Toole 79519e6a7e Parameterize graphite and openTSDB test timeouts 2015-04-17 18:32:59 -07:00
Philip O'Toole 665f57f72a Give table-driven tests 30 seconds per query 2015-04-17 18:32:58 -07:00
Philip O'Toole e9ebf654e9 Return number of nodes that responded OK 2015-04-17 18:32:58 -07:00
Philip O'Toole 50b08ff73f Bang on test server every 100 ms 2015-04-17 18:32:58 -07:00
Philip O'Toole 88b9276e33 Name 'show continuous queries' test 2015-04-17 16:18:28 -07:00
Philip O'Toole df16e6c121 Even better output from integration test 2015-04-17 16:18:28 -07:00
Cory LaNou c45e080640 fix test data collision 2015-04-17 16:18:28 -07:00
Cory LaNou cecd7f77e1 ClusterURL refactor VI 2015-04-17 16:18:28 -07:00
Cory LaNou 0d734868a8 use net.JoinHostPort 2015-04-17 16:18:28 -07:00
Cory LaNou 69d99a895a ClusterURL ractor III 2015-04-17 16:18:28 -07:00
Cory LaNou 6de52d5046 force OpenTSDB to use IPv4 formats 2015-04-17 16:18:28 -07:00
Cory LaNou 0469d8e283 explicitly specify bind port for graphite tests to properly form IPv6 addresses 2015-04-17 16:18:28 -07:00
Cory LaNou a689e8fcea refactor the ClusterURL again 2015-04-17 16:18:28 -07:00
Cory LaNou 893834afbb simplify ClusterURL 2015-04-17 16:18:28 -07:00
Cory LaNou 4d809a8920 no more port collisions 2015-04-17 16:18:28 -07:00
Cory LaNou 5fb81825db fix graphite default initialization 2015-04-17 16:18:28 -07:00
Cory LaNou bad336a6ae wip fixing graphite tests 2015-04-17 16:18:28 -07:00
Cory LaNou 6c0bfb5a43 make all integration tests safe to run in parallel 2015-04-17 16:18:28 -07:00
Philip O'Toole f349c23964 Should be no need to wait 60 seconds
Each of these tests relies on a write of only a few points. It simply
should not take 60 seconds.
2015-04-17 16:18:28 -07:00
Philip O'Toole 411ce965db Don't hammer the server during testing 2015-04-17 16:18:28 -07:00
Philip O'Toole 969b8c4d70 Don't log HTTP accesses during testing 2015-04-17 16:18:28 -07:00
Philip O'Toole a3fbba33da Allow control of HTTP logging 2015-04-17 16:18:28 -07:00
David Norton 86db3574ad fix #2286: parse error on CREATE CONTINUOUS QUERY 2015-04-17 16:40:29 -04:00
Jason Wilder a75845dfff Remove type check when handling closed network connection error 2015-04-17 12:30:11 -06:00
Jason Wilder 8aa0d32b6f Add failover to other data nodes for distributed queries
Fixes #2190
2015-04-17 11:28:47 -06:00
Jason Wilder fbaa37a5ef Close resp body during write tests 2015-04-17 11:28:47 -06:00
Jason Wilder 69944622bc Don't set data node until after it has joined or initialized
By setting it, data node requests can be served by the http handler
before the data node is actually ready.

Possible fix for:

2015/04/14 11:33:54 http: panic serving 10.0.1.8:62661: runtime error: invalid memory address or nil pointer dereference
goroutine 11467 [running]:
net/http.func·011()
	/usr/local/go/src/net/http/server.go:1130 +0xcc
github.com/influxdb/influxdb.(*Server).broadcast(0xc20805cc00, 0xc208220000, 0x5d25e0, 0xc208869e80, 0x0, 0x0, 0x0)
	/Users/jason/go/src/github.com/influxdb/influxdb/server.go:568 +0x227
github.com/influxdb/influxdb.(*Server).CreateDataNode(0xc20805cc00, 0xc2081c6e70, 0x0, 0x0)
	/Users/jason/go/src/github.com/influxdb/influxdb/server.go:859 +0xe6
github.com/influxdb/influxdb/httpd.(*Handler).serveCreateDataNode(0xc20842ea00, 0x19378c0, 0xc2082207e0, 0xc2083191e0)
2015-04-17 11:28:47 -06:00
Philip O'Toole 336caff1f0 Add test of COUNT with specific fill 2015-04-15 11:55:07 -07:00
ben hockey 8a8506e0bb add count aggregate fill test 2015-04-15 11:55:07 -07:00
Todd Persen 8b8ce9d4bb Merge pull request #2290 from neonstalwart/hostname
allow hostname arg to override test config
2015-04-15 11:02:10 -07:00
Ben Johnson 64a6274b87 Merge branch 'master' of https://github.com/influxdb/influxdb into cluster-listener
Conflicts:
	CHANGELOG.md
2015-04-15 11:57:59 -06:00
Ben Johnson 090f8c7120 fix race 2015-04-15 11:57:03 -06:00
Ben Johnson 6e124f3ab6 Start cluster before broker.
This commit fixes an issue where the second node joins but the first node
cannot commit because it doesn't have the HTTP endpoint running yet. This
is a side effect of streaming raft since we don't synchronize the quorum
set with the heartbeats. We should cache the config per term in the future.
2015-04-15 11:18:44 -06:00
ben hockey 84e87ce9c9 allow hostname arg to override test config 2015-04-15 10:52:23 -05:00
Philip O'Toole f591150699 Update CHANGELOG 2015-04-14 15:56:43 -07:00
Philip O'Toole b0ee5d0a78 Add broker truncation
Unit test same.
2015-04-14 15:15:26 -07:00
Philip O'Toole 8470ee27b6 Make MaxTopicSize and MaxSegmentSize configurable 2015-04-14 15:15:26 -07:00
Ben Johnson 47be5feb24 CHANGELOG 2015-04-14 14:44:18 -06:00
Ben Johnson c5bdb5af86 Fix cluster-wide restart issue. 2015-04-14 13:43:25 -06:00
Tristan Colgate-McFarlane 4b3345c10b OpenTSDB Input - use "value" as the field name
Closes #2280
2015-04-14 20:01:31 +01:00
Todd Persen eed570ea1b Fix merge conflict in CHANGELOG.md 2015-04-13 15:55:38 -07:00
Cory LaNou 96a30389f8 pr review changes 2015-04-13 16:27:43 -06:00
Jason Wilder b4d5d03a47 Ensure API can listen on separate interface/port
The HTTP bind address/port config was not actually being used.
2015-04-13 16:27:29 -06:00
Jason Wilder d78033bb49 Remove snapshot bind-address, port from config
Now listens on the cluster port.  Snapshots can still be disabled
though.
2015-04-13 16:27:29 -06:00
Jason Wilder 2f394a5cff Move snapshot server to cluster handler
This removes the separate port listener and adds it as a route
on the cluster port.
2015-04-13 16:27:23 -06:00
Cory LaNou 6240cc38ba refactor parse config on startup 2015-04-13 15:56:29 -06:00
Jason Wilder bdcb949916 Rename serveMetadata to serveData 2015-04-13 15:38:42 -06:00
Jason Wilder 0bf03347cb Rename serveData to serveAPI 2015-04-13 15:38:42 -06:00
Jason Wilder e47ee66b07 Make top-level handler less brittle
Move the data node specific routes under a common /data prefix so
add new handler does require updates to the top level handler as well.
2015-04-13 15:38:42 -06:00
David Norton c94785780d fix #2251: fix panic when changing default RP 2015-04-12 13:04:10 -04:00
Philip O'Toole d33e6138c4 Disable DQ integration testing 2015-04-11 11:52:37 -07:00
Philip O'Toole 5890025803 Make it clearer in tests where numbers come from 2015-04-10 16:30:49 -07:00
Philip O'Toole 925de06277 Seems like partial replication reads take longer 2015-04-10 16:19:46 -07:00
Philip O'Toole 2c554f45ba Hook up "run_mapper" in top-level handler
No doubt about it, URL routing is definitely brittle and needs work.
2015-04-10 16:19:46 -07:00
Philip O'Toole 559e1d40bd Use different base port range for DQ testing 2015-04-10 16:11:34 -07:00
Paul Dix 37d4f2a265 Fixes based on feedback. 2015-04-10 16:11:34 -07:00
Paul Dix 8a25683b92 Fix opentsdb integration tests after rebase 2015-04-10 16:11:34 -07:00
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
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
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
Jason Wilder c63866ea62 Remove Broker.Timout config
Not used
2015-04-06 16:38:00 -06:00
Jason Wilder 18db6fa7ba Separate baseline config from test config 2015-04-06 16:38:00 -06:00
Jason Wilder 45a2db9f0d Rename graphite/collect bind address config var name
Make it consistent w/ pre-existing "bind-address config options.
2015-04-06 16:37:59 -06:00
Jason Wilder 524e0719ed Add missing tests for snaphost config 2015-04-06 16:37:59 -06:00
Jason Wilder 384e3f3683 Add tests for config data/broker enabled 2015-04-06 16:37:59 -06:00
Jason Wilder eb9956b844 Rename ContinuouseQuery Disable to Disabled
Match Broker and Data config var names
2015-04-06 16:37:59 -06:00
Jason Wilder dcb3e85e84 Add a enabled config option for broker and data options 2015-04-06 16:37:59 -06:00
Jason Wilder 358bb9b3d9 Convert flag.String to flag.StringVar 2015-04-06 16:37:59 -06:00
Jason Wilder 5918d48f73 Allow passing config to RunCommand.Open 2015-04-06 16:37:59 -06:00
Jason Wilder 070bb3ccc6 Add logger to RunCommand 2015-04-06 16:37:59 -06:00
Jason Wilder 82b3108f6d Refactor execRun to RunCommand 2015-04-06 16:37:59 -06:00
Jason Wilder 88f9810ea9 Refactor help into command 2015-04-06 16:37:59 -06:00
Jason Wilder c356ff6483 Return fmt.Errorf() 2015-04-06 16:29:00 -06:00
Mark Rushakoff a13af0483a Use fmt.Println, not log.Println to print usage
The previous behavior caused "[srvr]" to print out during usage, e.g. in
`influxd help run`:

```
[srvr] 2015/04/06 11:58:04 usage: run [flags]

run starts the broker and data node server....
```
2015-04-06 13:12:00 -07:00
Philip O'Toole dbb7d2a319 Tweak openTSDB changes and update CHANGELOG 2015-04-06 11:10:50 -07:00
Tristan Colgate-McFarlane 32d6433c04 OpenTSDB server interface
Add an input collector for the OpenTSDB telnet protcol
2015-04-05 10:29:49 +01:00
Jari Sukanen a56ea6f191 client: rename client.Results type to client.Response (issue: #2050)
Rename client.Results to client.Response as it already has Results
property itself. Renaming it to Response makes code look much less
ugly.
2015-04-04 11:43:53 +03:00
Jason Wilder 9ee0f6445e Fix broker connect race at startup
When a data node starts up, the broker URLs were not set before
they were actually being used.  The call to client.Open() in
turn triggers the raft streamer and heartbeat which try to connect
to the broker.   If those started before the subsequent client.SetURLs()
call, you would see the following error in the logs at startup:

[messaging] 2015/04/01 11:59:22 reconnecting to broker: url={  <nil>  /messaging/messages index=2&streaming=true&topicID=0 }, err=Get /messaging/messages?index=2&streaming=true&topicID=0: unsupported protocol scheme ""

Fixing this race uncovered another bug where the join urls would be
cleared the first time the broker was started.  In this case, the
join urls should be left alone since they were set properly w/ SetURLs.

Fixes #2152
2015-04-03 21:04:42 -06:00
Jason Wilder 6d4c7e9cd5 Handle broker and data node endpoints regardless of role
This is a pre-requisite for #1934.  When running separate
broker and data nodes, you currently need to know what role
a host is performing.  This complicates cluster setup in
that you must configure separate broker URLs and data node
URLs.

This change allows a broker only node to redirect data nodes endpoints
to a valid data node and a data only node to redirect broker
endpoints to a valid broker.
2015-04-03 21:00:43 -06:00
Todd Persen 82bf75c691 Merge pull request #2150 from runner-mei/connection_refused
Make InfluxDB win32 friendly, fix unit test is failed on the windows and it is for connection refused.
2015-04-03 16:31:51 -07:00
Philip O'Toole 84d590ce44 Monitoring database should not be configurable 2015-04-03 14:40:36 -07:00
Philip O'Toole 5df05d1256 It's for stats and diags, not just diags 2015-04-03 14:26:17 -07:00
Philip O'Toole a8559cc37d Unit test OR tags 2015-04-03 11:41:16 -07:00
runner.mei 6a7cb61f6d fix unit test is failed with connection refused on the win32 2015-04-03 13:48:52 +08:00
Paul Dix f3dce09621 uncoment raw ordering test 2015-04-02 15:22:27 -07:00
Paul Dix c4b780d8b2 remove xxx before integration test 2015-04-02 15:22:27 -07:00
Paul Dix 6c46a5c83b 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-02 15:22:27 -07:00
Philip O'Toole 7b720b6169 Unit-test two queries in a single request 2015-04-02 11:38:39 -07:00
Philip O'Toole 8a9f8d0eda Add simple test that results in entries in values 2015-04-02 11:36:02 -07:00
Jason Wilder 91fb7e3756 Track data node urls on brokers
This sends data node urls via the broker heartbeat from each data
node.  The urls are tracked on the broker to support simpler
cluster setup as well as distributed queries.
2015-04-02 11:27:53 -06:00
Jason Wilder 0af6d1006d Move RestoreCommandTest to integration tests 2015-04-02 10:22:28 -06:00
Cory LaNou 8fa3571782 only need max procs for running 2015-04-02 10:27:35 -05:00
Cory LaNou e7866d3600 Set Go Max procs in a better location 2015-04-02 09:33:09 -05:00
Cory LaNou 87c3c46208 encode toml durations correctly 2015-04-01 20:20:04 -05:00
Philip O'Toole a7d904778a Correctly filter series for NEQREGEX
Series that do not have any tags are considered matching in the NEQREGEX
case so the must be explicitly added.
2015-03-31 16:14:30 -07:00
Philip O'Toole 60149cf7b5 Unit test EQ and NEQ tag query 2015-03-31 16:14:30 -07:00
Philip O'Toole 26b2a2662c Add unit test showing issue #1604 is fixed 2015-03-31 16:14:30 -07:00
Philip O'Toole 70d57d399d Check if the tag filter is a NOT
If so, then return all series IDs which do not match.

Fix for issue #2097
2015-03-31 16:14:30 -07:00
Paul Dix d8aca6029d Remove logo output on startup and output gomaxprocs setting 2015-03-29 19:01:38 -04:00
Ben Johnson 24db5f23e1 Set GOMAXPROCS. 2015-03-29 15:39:43 -06:00
Philip O'Toole 1b700264a7 Also include NEQ in filters
This fixes != for field value comparisons.
2015-03-27 23:07:57 -07:00
Philip O'Toole a0e9daee63 SHOW DATABASES returns series name "databases" 2015-03-27 16:24:57 -07:00
Philip O'Toole 3e59dac0fb Allow integration tests to be skipped 2015-03-27 11:28:19 -07:00
Philip O'Toole 8fe4e428a7 Bring 3-node test back online 2015-03-27 10:45:38 -07:00
Philip O'Toole a23984a840 Allow int tests to query only 1 node 2015-03-27 10:45:38 -07:00
Philip O'Toole 5e08351a27 Merge pull request #2087 from influxdb/_internal_not_internal
Use _internal as default self-monitoring database
2015-03-26 17:13:44 -07:00
Philip O'Toole efdb7e89e2 Disable snapshot endpoint during testing
Once we have proper endpoint layering, this can be re-enabled.
2015-03-26 16:25:30 -07:00
Philip O'Toole f829355e3e Allow snapshot endpoint to be disabled
Fix isse #2086
2015-03-26 16:13:23 -07:00
Philip O'Toole 1e10c46ea1 Remove all backup test paths 2015-03-26 14:58:07 -07:00
Philip O'Toole 7a5f66c75a Use _internal as default self-monitoring database 2015-03-26 14:12:14 -07:00
Philip O'Toole f22778a41f Merge pull request #2085 from influxdb/leading_underscores
Test leading underscores
2015-03-26 13:52:59 -07:00
Philip O'Toole ed918304c4 Test tags with leading underscores 2015-03-26 13:48:26 -07:00
Philip O'Toole 2a2c8ecddb Remove redundant writes from WHERE testing 2015-03-26 13:41:22 -07:00
Cory LaNou d653e41712 support fractional time on graphite endpoint 2015-03-26 14:18:40 -06:00
Cory LaNou 524eb78a69 graphite logs in seconds, not milliseconds 2015-03-26 14:18:40 -06:00
Philip O'Toole c461c7e7b4 Remove logging to specific file 2015-03-25 17:41:39 -07:00
Philip O'Toole 225459b25c Always write the logo to stdout
This change means it will always go to stdout, regardless of the log
setting.
2015-03-25 15:56:03 -07:00
Paul Dix 7076b9ea9a Merge pull request #2067 from influxdb/relative-times-off-2045
Fixing intervals for group by.
2015-03-24 22:17:12 -04:00
Cory LaNou 805cba71a4 clarify test name 2015-03-24 20:14:05 -06:00
Cory Lanou 7be574534c Fixing intervals for group by. Fixing bad PR 2015-03-24 20:13:05 -06:00
Ben Johnson 21782c0a67 Merge branch 'master' of https://github.com/influxdb/influxdb into backup-restore 2015-03-24 16:05:49 -06:00
Ben Johnson 4bc92c3018 Code review fixes. 2015-03-24 16:04:39 -06:00
Ben Johnson 2401e69f58 Add incremental backups.
This commit adds incremental backup support. Snapshotting from the server
now creates a full backup if one does not exist and creates numbered
incremental backups after that.

For example, if you ran:

  $ influxd backup /tmp/snapshot

Then you'll see a full snapshot in /tmp/snapshot. If you run the same
command again then an incremental snapshot will be created at
/tmp/snapshot.0. Running it again will create /tmp/snapshot.1.
2015-03-24 15:57:03 -06:00
Philip O'Toole fba41df82b Push version and commit hash onto Server 2015-03-23 23:45:57 -07:00
Ben Johnson 29cb550d95 Code review fixes. 2015-03-23 16:06:29 -06:00
Philip O'Toole 14585db38b Move TestServer_RawDataReturnsInOrder to int tests
Fix #2052
2015-03-23 12:14:15 -07:00
Ben Johnson 3befa12fa3 Merge branch 'master' of https://github.com/influxdb/influxdb into backup-restore
Conflicts:
	cmd/influxd/main.go
	cmd/influxd/run.go
2015-03-22 15:38:41 -06:00
Ben Johnson 11c808f55f Add restore and bootstrap.
This commit adds the "influxd restore" command to the CLI. This allows
a snapshot that has been produced by "influxd backup" to be restored
to a config location and the broker and raft directories will be
bootstrapped based on the state of the snapshot.
2015-03-22 15:31:49 -06:00
Ben Johnson 963d277a75 Add "influxd backup" command.
This commit adds the backup command to the influxd binary as well as
implements a SnapshotWriter in the influxdb package.

By default the snapshot handler binds to 127.0.0.1 so it cannot be
accessed outside of the local machine.
2015-03-22 10:54:14 -06:00
Philip O'Toole 2a4032a9a5 TestServer_LimitAndOffset to integration test 2015-03-20 20:54:40 -07:00
Philip O'Toole 57a1f5e500 Remove debug fmt.Println from tests 2015-03-20 16:36:49 -07:00
Philip O'Toole 1cc1902fb7 Merge pull request #2041 from influxdb/merge_many_series
Move "merge many" test to integration test
2015-03-20 16:35:28 -07:00
Philip O'Toole 8b48ff9a28 Move MergeMany to integration test 2015-03-20 16:32:34 -07:00
Philip O'Toole 566b2b62af Support writing test data via a function 2015-03-20 16:11:00 -07:00
Philip O'Toole 1cb60bdb62 Add help for 'config' command 2015-03-20 15:58:17 -07:00
Philip O'Toole ee29214898 Make it clear where influxd storage is 2015-03-20 15:19:30 -07:00
Philip O'Toole 45ac8ff2d9 Explicitly check for errors getting current user 2015-03-20 15:18:29 -07:00
Philip O'Toole f6f74a11bd Don't check 'configExists' at Run() level
*config was always non-null, since code at a higher level ensures that a
default config is passed down if no config is specified. So this logic
was pointless.
2015-03-20 14:10:50 -07:00
Ben Johnson 0461f401f6 Add SnapshotWriter. 2015-03-19 22:23:52 -06:00
Philip O'Toole 05fb2842ba Use _id for Series IDs
Fix issue #2008
2015-03-19 19:04:07 -07:00
Philip O'Toole 3001448f16 Merge branch 'master' into limit-group-by
Conflicts:
	CHANGELOG.md
2015-03-19 15:17:50 -07:00
Cory LaNou c13bdd5e86 refactor, bug fix, move tests to integration 2015-03-19 14:33:47 -06:00
Cory LaNou a6171b3382 refactor of limit/offset 2015-03-19 13:31:46 -06:00
Paul Dix 56281fbfd5 WIP: add IsRawQuery to select and fix LIMIT and OFFSET on GROUP BY time 2015-03-19 11:41:18 -04:00
Jonathan Nutzmann 105d0aa503 fixing failed integration tests - change how number of points calculated and the expected result of the server 2015-03-19 10:28:47 -05:00
Philip O'Toole 521cddb2a7 Move TestServer_ExecuteWildcardGroupBy 2015-03-18 17:37:08 -07:00
Philip O'Toole c95af24e43 Move TestServer_ExecuteWildcardQuery 2015-03-18 17:27:20 -07:00
Philip O'Toole b5d5ce070f Move TestServer_DropMeasurementSeriesTagsPreserved 2015-03-18 17:21:10 -07:00
Philip O'Toole 82136aab65 Move TestServer_ExecuteQuery to integration tests 2015-03-18 16:53:06 -07:00
Philip O'Toole fdc44be5e9 Add comment for precision-write tests 2015-03-18 16:16:52 -07:00
Philip O'Toole d06d9627f1 Use "internal" for self-monitoring database
Parser doesn't like database names that start with "_".
2015-03-18 12:43:04 -07:00
Todd Persen 4ee1216052 Merge pull request #1978 from influxdb/fix-1832
fix #1832: support regex in FROM clause
2015-03-18 11:20:30 -07:00
Grégory Starck 0c7e062a18 Also print the broker path.
So to know/see where it's actually located.
2015-03-18 11:58:56 -04:00
David Norton f338e8212c remove debugging change from tests 2015-03-17 12:46:27 -04:00
Cory LaNou 20b0c52484 fixing config print startup statement 2015-03-17 07:37:08 -06:00
David Norton 62ae32b0ce wire up regex in FROM clause 2015-03-16 19:40:59 -04:00
Cory LaNou 031490fff1 function -> method 2015-03-16 16:25:13 -06:00
Cory LaNou 961e2ee944 Print config 2015-03-16 16:24:44 -06:00
Philip O'Toole 50d2470041 Write totals, not diff, of internal stats 2015-03-15 14:32:46 -07:00
Philip O'Toole d627634991 Ensure internal retention policy exists 2015-03-15 14:32:46 -07:00
Philip O'Toole f4b3e3da9f Fix final 'go vet' errors 2015-03-15 14:32:46 -07:00
Philip O'Toole ae3b3d5252 Rename "metrics" to "stats" 2015-03-15 14:32:46 -07:00
Philip O'Toole ea7b7be534 Fix 'go vet' errors 2015-03-15 14:32:11 -07:00
Philip O'Toole 5240151517 Actually start self-monitoring if requested 2015-03-15 14:32:11 -07:00
Philip O'Toole d95c9454d2 Better names for statistics config options 2015-03-15 14:32:11 -07:00
Philip O'Toole 95f7a006a3 Fix test config for _internal database 2015-03-15 14:32:11 -07:00
Philip O'Toole f730257ee4 Implement self-monitoring 2015-03-15 14:31:16 -07:00
Ben Johnson 06d839223e Integration test delay. 2015-03-14 14:31:25 -06:00
Ben Johnson 53dbec8232 Add config notifications and increased test coverage. 2015-03-14 13:36:06 -06:00
Cory LaNou a19f81d3e9 Graphite numbers are always float64 2015-03-14 09:59:33 -06:00
Cory LaNou a37a303852 added tests for writing multiple values/fields for client 2015-03-13 17:00:57 -06:00
Ben Johnson 4b9a93d924 Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker 2015-03-12 15:46:04 -06:00
Philip O'Toole d82d040e59 Create databases for Graphite at higher level
By doing this the SeriesWriter interface stays focused and just has
methods for writing data. Its name then remains coherent.
2015-03-12 13:33:25 -07:00
Philip O'Toole 7717b11e6b Factor common code into Graphite package 2015-03-12 12:21:27 -07:00
Ben Johnson 7880bc2452 Add zero length data checks. 2015-03-12 12:12:26 -06:00
Ben Johnson 7ab19b9f91 Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker 2015-03-12 11:59:55 -06:00
Cory LaNou 291de444f3 update integration test 2015-03-12 11:09:14 -06:00
Cory LaNou ddc6e119ab Add default column to SHOW RETENTION POLICIES 2015-03-12 11:07:51 -06:00
Cory LaNou 58dac30fd5 auto create database for graphite if not specified 2015-03-12 10:20:49 -06:00
Paul Dix b4e1795e0b Merge pull request #1925 from influxdb/fill-options
Add fill to select statements.
2015-03-11 19:32:15 -07:00
Paul Dix 06e8c1b3e8 Add fill to select statements.
Fixes #1913
Add fill(none), fill(<num>), and fill(previous) options
2015-03-11 18:05:31 -07:00
Cory LaNou 41607c2115 Merge pull request #1758 from influxdb/start-graphite
Add Graphite Integration Test
2015-03-11 16:13:25 -06:00
Cory LaNou c46caf8503 go faster! 2015-03-11 15:26:37 -06:00
Cory LaNou 98484b613b the right way to wait for data 2015-03-11 14:43:50 -06:00
Philip O'Toole 8baf5fa184 Merge pull request #1923 from influxdb/int_timestamp_0_select
Some integration-testing of 'count()'
2015-03-11 13:42:13 -07:00
Philip O'Toole 239a10c679 Some integration-testing of 'count()' 2015-03-11 13:38:21 -07:00
Cory LaNou 5f8b176fd2 enable graphite endpiont test 2015-03-11 14:05:02 -06:00
Cory LaNou 174a3007bb clarify broker failed start messages 2015-03-11 14:05:02 -06:00
Cory LaNou c7068b77e9 better error for starting server so we can find what line it was 2015-03-11 14:05:01 -06:00
Cory LaNou 019b9de54e adding graphite integration test: skipped as it currently fails 2015-03-11 14:05:01 -06:00
Cory LaNou e3d74f6666 allow integration tests to take a custom config 2015-03-11 14:05:01 -06:00
Philip O'Toole 6ca09c40bb Merge pull request #1921 from influxdb/int_timestamp_0_select
Integration-test precision timestamps
2015-03-11 12:59:19 -07:00
Philip O'Toole 4e876a3106 Integration-test precision timestamps 2015-03-11 12:57:19 -07:00
Ben Johnson 5f6bcf523f Fix broker integration bugs. 2015-03-11 12:00:45 -06:00