Commit Graph

9150 Commits (23de1b15aab789e391c6f723ca83002f8e21ca37)

Author SHA1 Message Date
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
Ben Johnson 41d9f536ac Merge pull request #40 from xiangli-cmu/server
after stepdown candidate should return from collectvote and restart electiontimeout
2013-07-03 09:39:35 -07:00
Xiang Li 11de59fa06 after stepdown candidate should return from collectvote and restart election timeout 2013-07-02 20:51:19 -07:00
Ben Johnson 8b8791eb8f Merge pull request #39 from xiangli-cmu/server
Blocking the transportation when the server will stepdown
2013-07-02 19:31:55 -07:00
Xiang Li 88445830a0 close debugging 2013-07-02 18:24:19 -07:00
Xiang Li c87fa96a14 make stepdown blocking 2013-07-02 18:22:37 -07:00
Ben Johnson 73aa2c52e3 Merge pull request #38 from xiangli-cmu/master
change log ouput format to Lmicroseconds
2013-07-02 11:54:52 -07:00
Xiang Li 7a19090e5d change log ouput format to Lmicroseconds 2013-07-02 11:42:14 -07:00
Ben Johnson 4903668b23 Merge pull request #36 from xiangli-cmu/master
when promoted, election timeout should be stopped
2013-07-02 08:34:25 -07:00
Xiang Li c9ce5b4217 when promoted, election timeout should be stopped 2013-07-01 22:51:17 -07:00
Ben Johnson 24a78bcaee Merge pull request #34 from xiangli-cmu/master
clean up promotion
2013-07-01 09:23:14 -07:00
Xiang Li 24fe106efe clean up server_test.go 2013-07-01 09:14:21 -07:00
Xiang Li dac781172e non-blocking sending votes 2013-07-01 08:50:31 -07:00
Xiang Li a6a3f76ea1 clean up promote 2013-07-01 08:46:53 -07:00
Ben Johnson 73c172606f Merge pull request #33 from xiangli-cmu/master
Check checksum before load snapshot
2013-07-01 08:37:38 -07:00
Xiang Li a3e02e81ae snapshot checksum in hex 2013-06-30 19:50:48 -07:00
Xiang Li a48505bd95 clean up 2013-06-30 19:20:23 -07:00
Xiang Li 3c15b12198 clean up println 2013-06-30 19:14:02 -07:00
Xiang Li 521e3d7852 Merge https://github.com/benbjohnson/go-raft 2013-06-30 17:56:19 -07:00
Xiang Li 4f24fb775f check checksum before load snapshot 2013-06-30 17:55:54 -07:00
Ben Johnson 1dcaef3a6b Merge pull request #32 from xiangli-cmu/master
gofmt and add func to get the committed index
2013-06-29 19:17:59 -07:00
Xiang Li b0eaf972e6 we have pass the server pointer to the command, dont need to return index 2013-06-29 12:47:18 -07:00
Xiang Li 372b8409d7 Merge https://github.com/benbjohnson/go-raft 2013-06-28 22:39:59 -07:00
Xiang Li 4c13a40fe3 return command index in do(); add checking in peer.go; gofmt 2013-06-28 16:58:31 -07:00
Xiang Li 5c6766e13e return the index of the commited command to the application via do() and add Index func to get the current committed index of the server 2013-06-28 16:14:41 -07:00
Ben Johnson 82ccc09168 Merge pull request #27 from xiangli-cmu/master
Fix commit issue
2013-06-27 14:49:23 -07:00
Xiang Li 52f97d0c3a change init count val to 1 in func commitCenter() 2013-06-27 14:48:13 -07:00
Xiang Li aa76606fa8 fix three promote test 2013-06-27 14:46:11 -07:00
Xiang Li 4f9995291f Merge remote-tracking branch 'benbjohnson/master' 2013-06-27 13:19:29 -07:00
Xiang Li 941720fe07 gofmt 2013-06-27 13:10:52 -07:00
Xiang Li 1272a1cd30 add commit about fire at peer when leader has new commit index 2013-06-27 13:06:09 -07:00
Xiang Li 7a58a3efd0 candidate should also start election timeout when stepdown; At least one entry from the leader's current term must also be stored on 2013-06-27 13:03:22 -07:00
Ben Johnson a69c3f4478 Merge pull request #25 from xiangli-cmu/master
receive older committed index should not be error
2013-06-27 11:41:49 -07:00
Xiang Li 0ff7040047 delete panic in setCommitIndex 2013-06-27 10:41:53 -07:00
Xiang Li 9597f80857 receive older committed index should not be error 2013-06-27 10:22:49 -07:00
Ben Johnson 938b649b08 Minor Timer refactor. 2013-06-26 20:35:32 -06:00
Xiang Li 430b2eb661 clean up codes 2013-06-26 18:34:43 -07:00
Xiang Li e1fd7e46dd close debug and clean println 2013-06-26 17:21:00 -07:00
Xiang Li 8bc79aa999 gofmt 2013-06-26 17:12:44 -07:00
Xiang Li 0fab22808e clean up timer and change heartbeat and election to the new timer 2013-06-26 16:48:47 -07:00
Ben Johnson b9e1bdc86d Remove commitNotify(). 2013-06-26 12:57:31 -06:00
Ben Johnson e09c874f00 Clean up commitCenter(). 2013-06-26 12:57:16 -06:00
Ben Johnson 0bd3c9b1cd Remove unnecessary server locks. 2013-06-26 12:38:39 -06:00
Ben Johnson 46fb02f191 Add s.Peers() and peer cloning. 2013-06-26 12:25:22 -06:00
Ben Johnson ff349bbe40 Remove s.Peers(). 2013-06-26 12:11:43 -06:00
Ben Johnson 865da11ffc Log clean up. 2013-06-26 12:10:58 -06:00
Ben Johnson faeaa88410 Clean up Peer.flush(). 2013-06-25 15:41:42 -06:00
Ben Johnson b3dd52126b Fix TestLogExistingLog. 2013-06-25 15:20:03 -06:00
Ben Johnson 0aa9a8d145 Fix TestLogEntryUnmarshal. 2013-06-25 14:29:05 -06:00
Ben Johnson 2cf93fd102 Clear reference to LogEntry.result after return. 2013-06-25 14:22:23 -06:00