Commit Graph

34 Commits (019110c9c05ad439bd37aca9fa27cbc934b52847)

Author SHA1 Message Date
Ben Johnson fd96e245cb Merge branch 'master' of https://github.com/influxdb/influxdb into broker-recovery
Conflicts:
	CHANGELOG.md
2015-04-04 08:09:06 -06:00
Ben Johnson ba3026f400 Broker log recovery.
This pull request adds recovery to the messaging.Topic when opening. If
any partial messages are found then the file is truncated at that point
and started from there. This can occur when ungracefully shutting down
a server. It can leave half written messages at the end of segments.
2015-04-04 08:06:35 -06: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 64f6900ce2 Change 1000ms to 1s 2015-04-02 11:27:59 -06: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
Philip O'Toole c461c7e7b4 Remove logging to specific file 2015-03-25 17:41:39 -07:00
Ben Johnson b045ad5d92 Wrap open logic in anonymous functions. 2015-03-14 13:55:19 -06:00
Ben Johnson 53dbec8232 Add config notifications and increased test coverage. 2015-03-14 13:36:06 -06:00
Ben Johnson 12e8939647 Fix messaging client redirection. 2015-03-12 15:34:20 -06:00
Ben Johnson 7880bc2452 Add zero length data checks. 2015-03-12 12:12:26 -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
Ben Johnson ef8658e0fc Continuing stateless broker refactor. 2015-03-08 15:28:43 -06:00
Philip O'Toole 96645c7b51 Only use scheme and host of redirected URL 2015-03-06 15:19:16 -08:00
Philip O'Toole 317fe8335a Client should track current broker leader 2015-03-06 13:59:21 -08: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
Philip O'Toole 9943f86cf4 Enable module-level logging 2015-01-29 15:07:58 -08:00
Ben Johnson 0c64014fac Add additional broker HTTP redirection. 2015-01-28 03:41:28 -05:00
Ben Johnson 3601c3c79f Fix restarts and broker redirection. 2015-01-28 01:09:50 -05: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 c373eba2f5 Don't store Broker URLs in two variables
Simply embed the custom config type in the Client object.
2014-12-16 21:25:20 -08:00
Philip O'Toole f5d48de7a8 Update messaging client unit tests 2014-12-16 21:19:42 -08:00
Philip O'Toole ceeb1f6946 Store Messaging Client config in file
The presence of this file is also used to determine if a node should run
in local client mode, or should contact a Broker.
2014-12-16 19:57:20 -08:00
Ben Johnson 5fe566466e Add messaging and raft test coverage. 2014-11-12 22:32:42 -07:00
Ben Johnson 2c7f879f4d Integrating http handler. 2014-11-10 22:25:03 -07:00
Ben Johnson 9c1e9d93bc Add broker client publishing. 2014-10-23 18:54:12 -06:00
Ben Johnson 7db0e15799 Refactoring into root. 2014-10-21 23:32:19 -06:00
Ben Johnson f6ef96c142 Refactor broker to messaging pkg. 2014-10-20 20:42:03 -06:00