Commit Graph

143 Commits (b01e3e713e3958ca8075100d274511ab0a77308b)

Author SHA1 Message Date
Xiang Li 2a55836dbe Merge branch 'addSyncAttr' 2013-07-24 17:15:20 -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 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 e4e81010ae change func names and fix typo 2013-07-18 16:44:01 -07:00
Xiang Li 800aaa64b7 change getLogEntry to getEntry 2013-07-18 16:29:06 -07:00
Xiang Li dee43ecd60 add spanshot loop with protobuf 2013-07-18 13:39:07 -07:00
Xiang Li e3322b65d5 Merge branch 'snapshotLoop' into newSnapshotLoop 2013-07-18 10:21:03 -07:00
Xiang Li bcdc237b3e Merge https://github.com/coreos/go-raft 2013-07-17 14:24:31 -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 5bfda2c28e remove nitro package 2013-07-16 18:00:16 -07:00
Xiang Li b743f48d71 add snapshotting state 2013-07-16 17:40:19 -07:00
Xiang Li 1bbbf7ca6a remove nitro 2013-07-16 13:23:05 -07:00
Xiang Li 5c9cec3f74 keep recent log entries after snapshot 2013-07-16 13:16:33 -07:00
Xiang Li 10f8b9f836 Merge https://github.com/benbjohnson/go-raft 2013-07-16 12:28:52 -07:00
Xiang Li 557c735f69 move MLPR frmo log to server 2013-07-14 22:48:41 -07:00
Xiang Li 5482d260ce follower will not promote until get synced 2013-07-11 18:03:24 -07:00
Xiang Li 9cafa8fe1d add nitro tool to go-raft lib 2013-07-11 12:56:34 -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 d0da319e26 Merge https://github.com/benbjohnson/go-raft 2013-07-10 16:35:00 -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
Ben Johnson 2ee061c60f Fix state check in candidate inner loop. 2013-07-10 11:46:11 -06:00
Xiang Li 62ddd377a0 add encoding speed test and gofmt 2013-07-10 10:31:56 -07:00
Ben Johnson 5e713120bf HTTP Transporter fixes. 2013-07-08 21:00:14 -06: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 3392f8192f Remove the lock in init(). Since addPeer func() require that lock. When do log replay in the init(), there will be deadlock 2013-07-08 16:42:33 -07:00
Xiang Li b3e7f49a33 do not send commit signal if it came from old leader 2013-07-08 10:35:26 -07: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 53d43dee4f fix election timeout problem 2013-07-07 21:31:58 -07:00
Xiang Li 46dd6bbd81 when change the state to leader, we should also update the s.leader to its own name 2013-07-07 17:01:55 -07:00
Xiang Li fa3ec69b6b fix break in select 2013-07-07 16:52:18 -07:00
Xiang Li d3787f60c1 when candidate stepdown it should break the loop; gofmt 2013-07-07 16:37:11 -07:00
Xiang Li 6c6c76bbd9 [Fix #52] Detect new leader with same term as candidate in processAppendEntriesRequest 2013-07-07 16:26:18 -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 cbceb05801 add server state mutex to avoid state race condition 2013-07-05 10:44:03 -07:00
Xiang Li fe55d87640 server should not be blocking will holding the lock 2013-07-03 10:10:43 -07:00
Xiang Li 5c5b489331 rafactor server.go 2013-07-03 09:53:46 -07:00
Xiang Li 11de59fa06 after stepdown candidate should return from collectvote and restart election timeout 2013-07-02 20:51:19 -07:00
Xiang Li c87fa96a14 make stepdown blocking 2013-07-02 18:22:37 -07:00
Xiang Li 7a19090e5d change log ouput format to Lmicroseconds 2013-07-02 11:42:14 -07:00
Xiang Li c9ce5b4217 when promoted, election timeout should be stopped 2013-07-01 22:51:17 -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