Commit Graph

84 Commits (029b60f530ab3463edbb095f2e540b9c49045707)

Author SHA1 Message Date
Ben Johnson b545b8d44e Merge pull request #166 from philips/change-heartbeatTimeout-to-heartbeatInterval
fix(*.go): rename HeartbeatTimeout to HeartbeatInterval
2014-01-27 07:21:33 -08:00
Xiang Li bdeac89463 leader must stop all heartbeat routines before stepdown and truncate its log 2014-01-27 09:05:54 -05:00
Brandon Philips 6ce38579a4 fix(*.go): rename HeartbeatTimeout to HeartbeatInterval
While re-reading the etcd tuning guide I realized that perhaps it is a
bit of a misnomer to call this a "Timeout" since unlike the "Election
Timeout" there is no immediate consequence of it being missed.

Perhaps naming it interval would be better?
2014-01-23 13:22:41 -08:00
Xiang Li 2987111400 bug fix 2014-01-23 14:45:04 -05:00
Xiang Li 46491a8686 p.server instead of server 2014-01-23 14:13:41 -05:00
Xiang Li 6ffaa2484c more docs 2014-01-23 11:50:09 -05:00
Xiang Li 0916bba25a fix peer ae.response bug 2014-01-23 11:45:41 -05:00
Xiang Li 353d5f3803 mrege master 2014-01-23 08:36:56 -05:00
Brian Waldon 15dd02e3f9 feat(event): Add HeartbeatEventType 2014-01-21 08:24:28 -08:00
Xiang Li c906836cfa in progress 2014-01-12 15:40:55 +08:00
Xiang Li 8ce022418d refactor do not copy entry around when doing encoding 2014-01-11 22:41:12 +08:00
Xiang Li cede927431 refactor(peer.go) clean up debugging info 2014-01-09 21:26:35 +08:00
Xiang Li 33e7b45920 merge with master 2014-01-09 18:18:06 +08:00
Joseph Crail c6a6491d39 Fix spelling errors in comments and strings. 2014-01-08 22:59:13 -05:00
Ben Johnson 390a4b2c72 Add election threshold and heartbeat timeout events. 2013-12-29 12:54:00 -07:00
Xiang Li 59cb7259c2 fix(server.go/peer.go) server.stop should stop heartbeat before close the log 2013-11-27 00:30:03 -05:00
Xiang Li 3deb46e6f5 refactor(peer.go) use async send if possible 2013-11-26 23:38:07 -05:00
Xiang Li 908dd124bd refactor(peer.go) use ticker 2013-11-26 23:28:50 -05:00
Ben Johnson 8f6f82fb2c Server interface. 2013-10-14 11:54:49 -06:00
Xiang Li 0e62627e27 check sendSRR response 2013-09-17 19:18:50 -04:00
Xiang Li 851ca9ceea add connectionstring 2013-08-15 16:35:01 -07:00
Xiang Li f16052cd9f minor fix 2013-08-12 21:01:30 -07:00
Xiang Li 132dae3022 before remove the node, flush the remove command to the node first 2013-08-12 14:46:32 -07:00
Xiang Li d286dfdc6c write log entry to file on disk when appendEntry and truncate log file on disk when truncate log entries 2013-07-20 19:07:16 -07:00
Xiang Li 6b6e167d38 separate sendSnapshotRecovery logic into sendSnapshotRecoveryRequest func 2013-07-18 16:56:21 -07:00
Xiang Li e4e81010ae change func names and fix typo 2013-07-18 16:44:01 -07:00
Xiang Li e3322b65d5 Merge branch 'snapshotLoop' into newSnapshotLoop 2013-07-18 10:21:03 -07:00
Ben Johnson e3b06c530a [Fix #74] Refactor to use binary log and binary RPCs. 2013-07-17 07:45:53 -06:00
Xiang Li b743f48d71 add snapshotting state 2013-07-16 17:40:19 -07:00
Xiang Li 557c735f69 move MLPR frmo log to server 2013-07-14 22:48:41 -07:00
Xiang Li 2abebe3065 refactor 2013-07-10 22:19:57 -07:00
Xiang Li b9e1da8ac2 let knowen peer to rejoin to the cluster 2013-07-10 20:02:24 -07:00
Xiang Li 75e0a229e9 commit a NOP after the server becomes leader. Commit ohter commands, after the majority of the peers synced by the NOP command 2013-07-10 16:07:14 -07:00
Xiang Li 62ddd377a0 add encoding speed test and gofmt 2013-07-10 10:31:56 -07:00
Ben Johnson 4ee205422c Merge branch 'master' of https://github.com/benbjohnson/go-raft into http-transporter
Conflicts:
	peer.go
	server.go
2013-07-08 20:56:15 -06:00
Ben Johnson 5aa494ddf9 Add HTTPTransporter. 2013-07-08 20:55:00 -06:00
Xiang Li 7178b21d27 create new channel before start heartbeat to avoid recv stop signal from old heartbeat func 2013-07-07 22:26:36 -07:00
Xiang Li e045441f52 fix peer stop channel problem 2013-07-07 19:58:01 -07:00
Ben Johnson 00d109823e Retrieve peer index and term before verifying server state in heartbeat. 2013-07-07 16:19:03 -06:00
Ben Johnson 107888aaff Pass race detector. 2013-07-07 16:12:24 -06:00
Ben Johnson 743b684370 gofmt 2013-07-07 14:55:55 -06:00
Ben Johnson 08e2d519ae Refactor server event loop. 2013-07-07 14:21:04 -06:00
Ben Johnson ce3dbb5dfb Server clean up. 2013-07-06 13:41:42 -06:00
Ben Johnson 44f3ef6701 [Fix #47] Clean up external interface. 2013-07-05 22:49:47 -06:00
Xiang Li 5f64d15776 change > to >=. > will cause panic when resp.CommitIndex equals prevLogIndex 2013-07-05 16:45:55 -07:00
Xiang Li cbceb05801 add server state mutex to avoid state race condition 2013-07-05 10:44:03 -07:00
Xiang Li 97d60f605d reduce one gorotine to select in peer.go flush() 2013-07-03 10:05:15 -07:00
Xiang Li d3f5d2b7fc timeout for transfere. This helps when the node is far left behind. The server will not wait for sending a large package before send the other heartbeat 2013-07-03 09:45:57 -07:00
Xiang Li a6a3f76ea1 clean up promote 2013-07-01 08:46:53 -07:00
Xiang Li 4c13a40fe3 return command index in do(); add checking in peer.go; gofmt 2013-06-28 16:58:31 -07:00