Commit Graph

81 Commits (2252dfea4ca6c39a05d1a3c944a6ed6a0b3e9e22)

Author SHA1 Message Date
Xiang Li 358e8f148d refactor use separate lock instead of having setTerm function 2013-11-05 19:12:26 -08:00
Xiang Li d4748404ab fix test for data race 2013-10-22 15:39:32 -07:00
Ben Johnson 8f6f82fb2c Server interface. 2013-10-14 11:54:49 -06:00
Damian Gryski a1614ed519 server_test: t.Fatalf() with missing formatting directive 2013-10-10 22:54:22 +02:00
Xiang Li dbedc982df fix snapshot related issue 2013-09-18 00:19:46 -04:00
Xiang Li 851ca9ceea add connectionstring 2013-08-15 16:35:01 -07:00
Xiang Li ff29c6d17d wip/ move write/read to server.go and add test 2013-08-15 12:25:00 -07:00
Xiang Li 75c9644bbc avoid deadlock 2013-08-02 09:03:23 -07:00
Xiang Li 8865839357 should not close request body 2013-08-02 07:59:16 -07:00
Xiang Li f60cf3a74f sleep time should not be hardcoded 2013-08-02 03:01:06 -07:00
Xiang Li 78cb651d93 move buf to log struct 2013-08-01 17:58:03 -07:00
Xiang Li e4f2c13906 change join command to interface, so application can overwrite it 2013-07-26 12:13:52 -07:00
Xiang Li a7e01bb47a improve init process 2013-07-25 15:40:20 -07:00
Xiang Li 057351ea5c with assertion problem at server.go L567 2013-07-25 14:26:27 -07:00
Xiang Li 2a55836dbe Merge branch 'addSyncAttr' 2013-07-24 17:15:20 -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 41209beb5a change binary encoding to protobuf 2013-07-18 09:26: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 5482d260ce follower will not promote until get synced 2013-07-11 18:03:24 -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
Ben Johnson 5e713120bf HTTP Transporter fixes. 2013-07-08 21:00:14 -06: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
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 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 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 c87fa96a14 make stepdown blocking 2013-07-02 18:22:37 -07:00
Xiang Li 24fe106efe clean up server_test.go 2013-07-01 09:14:21 -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
Xiang Li aa76606fa8 fix three promote test 2013-06-27 14:46:11 -07:00
Ben Johnson 938b649b08 Minor Timer refactor. 2013-06-26 20:35:32 -06:00
Xiang Li e1fd7e46dd close debug and clean println 2013-06-26 17:21:00 -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 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 d8884cbbea change the do struct and add commit center 2013-06-23 11:42:31 -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 769a5ed6a1 go fmt 2013-06-07 22:19:18 -04:00
Xiang Li f15cadeffd add snapshot unit test 2013-06-05 20:25:17 -07:00
Xiang Li 32729ef871 solve conflicts 2013-06-04 17:22:09 -07:00
Xiang Li 3a6fc7bee4 add log-compaction 2013-06-04 17:02:45 -07:00
Ben Johnson 8efbb1535e Fix peer timer race condition. 2013-06-04 09:35:43 -04:00