Ben Johnson
9a253886e7
Dispatch commit event.
2014-02-10 09:36:17 -07:00
Xiang Li
e615676f54
fix(log): use Rlock in getEntriesAfter
...
getEntriesAfter only reads the log and doesn't make any motifications.
Using an RLock is safe here.
2014-02-07 10:23:29 -08:00
Xiang Li
1d7bc80fbe
drop unused field in log
2014-01-28 11:17:05 -05:00
Xiang Li
353d5f3803
mrege master
2014-01-23 08:36:56 -05:00
Xiang Li
10bd64768a
remove proto prefix
2014-01-23 08:29:50 -05:00
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
8ce022418d
refactor do not copy entry around when doing encoding
2014-01-11 22:41:12 +08:00
Xiang Li
f6b1cc1407
import gogoproto instead of goproto
2014-01-11 20:35:09 +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