Commit Graph

31376 Commits (23dbffd7e3320b7420c710e5eb6f9920d027f600)

Author SHA1 Message Date
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
Ben Johnson e526ed3441 Convert LogEntry.result to interface type. 2013-06-25 14:20:53 -06:00
Ben Johnson 8f8104642d Add some padding to the entry's commit channel. 2013-06-25 14:17:42 -06:00
Ben Johnson b80b7c5a62 Add debug mode. 2013-06-25 14:11:48 -06:00
Ben Johnson dbcb144af6 Merge branch 'master' of https://github.com/xiangli-cmu/go-raft into xiangli-master
Conflicts:
	server.go
2013-06-25 13:17:00 -06:00
Xiang Li 00fb080e7c add comments and gofmt 2013-06-24 09:52:51 -07:00
Xiang Li 2bc38456cb fix issues, further cleaning is needed 2013-06-23 20:41:43 -07:00
Xiang Li d8884cbbea change the do struct and add commit center 2013-06-23 11:42:31 -07:00
Ben Johnson 730cdd4d40 Merge pull request #20 from temoto/patch-1
Patch 1
2013-06-22 11:48:59 -07:00
Sergey Shepelev 494bf7e0fa server.MemberCount: synchronize access to .peers map with mutex 2013-06-22 19:38:48 +04:00
Sergey Shepelev 19ad97520b server.MemberCount: count peers with len() is cheaper than loop 2013-06-22 19:35:30 +04:00
Xiang Li 5bef65699c when the leader fails in during the collecting response phase, let it step down 2013-06-13 11:03:32 -07:00
Xiang Li f294f3cb9d fix snapshot 2013-06-12 09:47:48 -07:00
Xiang Li 3b73c41286 election new leader and rejoin works 2013-06-11 15:30:13 -07:00
Xiang Li 531e12146a add timer.fire function, which can fire at the timer channel 2013-06-09 21:47:59 -07:00
Xiang Li 094e77f624 use heartbeat to flush the new command in do() function and keep the response result in the log entry 2013-06-08 22:39:50 -07:00
Ben Johnson f9ec2ed5eb Minor cleanup. 2013-06-07 22:41:36 -04:00
Ben Johnson 847bf85fc4 Clean up TestTakeAndSendSnapshot test. 2013-06-07 22:37:10 -04:00
Ben Johnson 769a5ed6a1 go fmt 2013-06-07 22:19:18 -04:00
Ben Johnson 3bcf91a39f Merge branch 'master' of https://github.com/xiangli-cmu/go-raft into xiangli-cmu-master
Conflicts:
	log.go
2013-06-07 17:53:27 -04:00
Ben Johnson bb7caaf889 Add RemovePeer(). 2013-06-07 01:58:41 -04:00
Xiang Li 86bff03c08 add unit test for statemachine 2013-06-06 13:54:27 -07:00
Xiang Li 4fc43b68d6 add statemachine interface 2013-06-05 21:14:07 -07:00
Xiang Li 4d96f3578e add snapshot unit test 2013-06-05 20:36:25 -07:00
Xiang Li 349a1abacc solve conflicts 2013-06-05 20:32:52 -07:00