Commit Graph

33 Commits (c59015d42cf160c598a7eb5b2f128467eeba28d8)

Author SHA1 Message Date
Philip O'Toole e9ce592e97 Create tombstone when topic is truncated
If a data node requests a topic index that is earier than is present for
a topic, tombstones allow the broker to know that the data node should
be redirected to another node that has the topic's data already
replicated. If no tombstone exists, then the broker can simply restart
replaying the topic data it has.
2015-04-14 15:56:39 -07:00
Philip O'Toole f6768e500f Don't delete unreplicated segments
A segment must now have been replicated by at least 1 node before it can
be deleted.
2015-04-14 15:15:27 -07:00
Philip O'Toole b0ee5d0a78 Add broker truncation
Unit test same.
2015-04-14 15:15:26 -07: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
Ben Johnson cc83f2c39b Add checksum to message encoding
This commit changes the binary format of messaging.Message to encode
a 4-byte checksum at the beginning of it. This is used when reading
data back out to verify that it is not corrupt.

Corrupted messages are truncated on recovery so the broker can
restart from the previous message.
2015-04-07 14:24:22 -06:00
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
runner.mei e129c53f64 fix unit test is failed on the windows 2015-04-03 13:50:28 +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 057309fc8e Simplify raft snapshotting, entry apply. 2015-03-26 20:32:39 -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 96748cb217 Update file permissions. 2015-03-14 13:49:25 -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 4160d0b785 Add continuously streaming topic readers. 2015-03-09 22:32:12 -06:00
Ben Johnson ef8658e0fc Continuing stateless broker refactor. 2015-03-08 15:28:43 -06:00
Ben Johnson b937f06c1f Implementing stateless broker. 2015-03-05 19:32:20 -07:00
Ben Johnson 1bbf154f2a Removing replicas and subscriptions from broker. 2015-03-01 22:32:20 -07:00
Ben Johnson 85be4e1f6a Merge branch 'master' of https://github.com/influxdb/influxdb into broker-truncation 2015-03-01 09:47:39 -07:00
Ben Johnson 16dbe8ba2f Add Broker.Truncate(). 2015-03-01 07:06:25 -07:00
Cory LaNou ad16b1b1ed disabling test until fixed. Issue #1726 2015-02-25 11:20:37 -07:00
Ben Johnson 408cf37e5a Fix broker reopen test, docs. 2015-02-21 15:25:11 -07:00
Ben Johnson a5692b71ee Add proper broker recovery.
This commit fixes the broker recovery so that it determines the last index
from the various topic logs instead of persisting the snapshot on every
message that comes in.
2015-02-21 08:21:51 -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 26f4cf6cba Add raw broker benchmark. 2015-01-28 21:44:13 -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 66016e10ff Check for connection URL on Broker Open()
Update unit tests suitably.
2014-12-19 17:09:39 -05: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