Commit Graph

24 Commits (c5bdb5af86ea306b8d09ac7aa4246f0e2a02b043)

Author SHA1 Message Date
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
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
runner.mei e129c53f64 fix unit test is failed on the windows 2015-04-03 13:50:28 +08:00
runner.mei 6a7cb61f6d fix unit test is failed with connection refused on the win32 2015-04-03 13:48:52 +08: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
Ben Johnson 53dbec8232 Add config notifications and increased test coverage. 2015-03-14 13:36:06 -06:00
Ben Johnson 5f6bcf523f Fix broker integration bugs. 2015-03-11 12:00:45 -06:00
Ben Johnson 66115f95ca Merge branch 'master' of https://github.com/influxdb/influxdb into stateless-broker
Conflicts:
	cmd/influxd/run.go
	messaging/broker.go
	messaging/client.go
	messaging/client_test.go
	messaging/intg_test.go
	server.go
	tx_test.go
2015-03-10 16:27:37 -06:00
Ben Johnson 27e9132796 Integrate stateless broker into remaining packages. 2015-03-10 14:53:45 -06:00
Ben Johnson 5f5c6ca297 Integrate stateless messaging into influxdb package. 2015-03-09 15:47:41 -06:00
Ben Johnson 9b5aeb1a90 Refactor messaging client/conn. 2015-03-07 23:21:44 -07:00
Philip O'Toole 710e0d7de9 Add unit test for client tracking leader URL 2015-03-06 15:19:18 -08:00
Ben Johnson b937f06c1f Implementing stateless broker. 2015-03-05 19:32:20 -07:00
Ben Johnson 16dbe8ba2f Add Broker.Truncate(). 2015-03-01 07:06:25 -07:00
Paul Dix 36d16a3172 Update broker to have URLs for replicas
* Update the infludb broker to not need a server so that it'll work on non-data node servers
* Update messaging broker to keep track of connect urls for replicas
2015-02-17 21:02:53 -05:00
Ben Johnson 071ab8510a Merge branch 'master' of https://github.com/influxdb/influxdb into write-series 2015-01-12 12:37:48 -07:00
Philip O'Toole 295d63cb57 More vet fixes 2015-01-11 15:14:22 -08:00
Ben Johnson 946007916c Partial write series code. 2015-01-10 08:48:50 -07:00
Ben Johnson 50a0826026 Add broker snapshot/restore and CLI join. 2015-01-06 17:21:32 -07:00
Ben Johnson 7a1de8a459 Use replica id instead of replica name. 2014-12-23 17:01:06 -07:00
Philip O'Toole f5d48de7a8 Update messaging client unit tests 2014-12-16 21:19:42 -08:00
Ben Johnson 5fe566466e Add messaging and raft test coverage. 2014-11-12 22:32:42 -07:00
Ben Johnson fdee900161 Remove topic name from messaging. 2014-10-23 22:22:52 -06:00
Ben Johnson f6ef96c142 Refactor broker to messaging pkg. 2014-10-20 20:42:03 -06:00