Commit Graph

75 Commits (1352897623447e58da386fa8f1fb986c807a428e)

Author SHA1 Message Date
Xiang Li b01e3e713e fix a logic error in log open 2013-07-24 17:21:30 -07:00
Xiang Li ee265c7ead do not use buffered reader, since sometimes cannot read file content out 2013-07-24 17:14:21 -07:00
Xiang Li 085da0973e refactor on buffer writes 2013-07-24 11:43:33 -07:00
Xiang Li 95efaa7a0b write multiple entries with a buffered io 2013-07-24 11:03:20 -07:00
Xiang Li 487fe5874d refactor fixlog 2013-07-23 15:30:14 -07:00
Xiang Li f6d92c9d42 add comments for flushCommitIndex func 2013-07-22 15:01:32 -07:00
Xiang Li 97de42439d do not to init variable to zero 2013-07-22 14:55:05 -07:00
Xiang Li aaf304693e remove panic from log.go 2013-07-22 14:32:52 -07:00
Xiang Li d170e3e958 add position to log_entry protobuf 2013-07-22 14:29:54 -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 800aaa64b7 change getLogEntry to getEntry 2013-07-18 16:29:06 -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 72abfa40a7 combine two dup func 2013-07-16 17:43:12 -07:00
Xiang Li b743f48d71 add snapshotting state 2013-07-16 17:40:19 -07:00
Xiang Li 5c9cec3f74 keep recent log entries after snapshot 2013-07-16 13:16:33 -07:00
Xiang Li 557c735f69 move MLPR frmo log to server 2013-07-14 22:48:41 -07:00
Xiang Li 2e75d0846e change mtu to maxLogEntriesPerRequest 2013-07-14 22:19:48 -07:00
Xiang Li af7d99eae0 set mtu 2013-07-14 21:38:42 -07:00
Xiang Li 9efa791026 record the value of the commit result before remvoe it 2013-07-08 10:56:26 -07:00
Xiang Li d3787f60c1 when candidate stepdown it should break the loop; gofmt 2013-07-07 16:37:11 -07:00
Ben Johnson 107888aaff Pass race detector. 2013-07-07 16:12:24 -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 95d369e659 init the log entries. 2013-07-03 09:51:20 -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 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
Xiang Li 430b2eb661 clean up codes 2013-06-26 18:34:43 -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 e09c874f00 Clean up commitCenter(). 2013-06-26 12:57:16 -06:00
Ben Johnson faeaa88410 Clean up Peer.flush(). 2013-06-25 15:41:42 -06:00
Ben Johnson e526ed3441 Convert LogEntry.result to interface type. 2013-06-25 14:20:53 -06:00
Ben Johnson b80b7c5a62 Add debug mode. 2013-06-25 14:11:48 -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
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 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 349a1abacc solve conflicts 2013-06-05 20:32:52 -07:00
Ben Johnson 77c63cc1f1 Add error lookup for committed log entries. 2013-06-05 13:57:31 -04:00
Xiang Li 842aa1a0ad fix issues (https://github.com/benbjohnson/go-raft/pull/19) 2013-06-05 10:38:49 -07:00