Commit Graph

93 Commits (5aa95dfde665cd8d99b2b1d58111f1e9566f2519)

Author SHA1 Message Date
Xiang Li 2c0c8f0635 Merge pull request #150 from xiangli-cmu/sync_fix
Fix file issue
2014-01-15 04:27:30 -08:00
Brian Waldon 6b0e658226 fix(logging): Fix malformed log statement 2014-01-13 13:07:10 -08:00
Xiang Li 3f98381739 fix(sync) leader should do a sync before committing log entires
As we do not fsync every time log writes to file when the state is leader, we need to do fsync before actually committing the log entries to ensure safety.
2014-01-10 20:45:53 +08:00
Baruch Even b66cb1a0de Correct replacing of log file
Do not leak resources in case of errors and ensure data is synced to
disk before replacing files.
2014-01-10 19:28:38 +08:00
Xiang Li 33e7b45920 merge with master 2014-01-09 18:18:06 +08:00
Joseph Crail c6a6491d39 Fix spelling errors in comments and strings. 2014-01-08 22:59:13 -05:00
Xiang Li 42e4b8d3f5 remove command timeout 2013-12-30 16:58:38 +08:00
Ben Johnson 7defa721ab Fix internal log index deadlock. 2013-12-27 15:23:59 -07:00
Scooletz 267449da18 append vs commit comment changed 2013-12-17 22:33:11 +01:00
Xiang Li 2252dfea4c chrod more clear debug info for committing 2013-11-27 00:42:01 -05:00
Xiang Li 8c7779d681 fix add lock 2013-10-22 14:55:51 -07:00
Xiang Li dbedc982df fix snapshot related issue 2013-09-18 00:19:46 -04:00
Xiang Li cd98f72c58 conf 2013-08-13 14:31:19 -07:00
Brandon Philips 89a6c5bdd2 chore(*.go): fix imports for protobuf
Fix all of the imports to move from benbjohnson to goraft. Thanks to Ben
for making this move to a new github org.
2013-08-09 21:47:51 -07:00
Xiang Li 28c8de8850 delete print 2013-08-05 19:35:19 -07:00
Xiang Li 11e6b1a66f when restart, compact all the log entries before snapshot. Avoid wrong startTerm 2013-08-05 19:33:07 -07:00
Xiang Li 31db0ff136 init fix 2013-08-02 19:00:11 -07:00
Xiang Li 78cb651d93 move buf to log struct 2013-08-01 17:58:03 -07:00
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