Xiang Li
029b60f530
add conditions for state for loops
2014-01-28 10:58:23 -05:00
Xiang Li
56d6c1755c
merge with master
2014-01-28 10:52:53 -05:00
Ben Johnson
b545b8d44e
Merge pull request #166 from philips/change-heartbeatTimeout-to-heartbeatInterval
...
fix(*.go): rename HeartbeatTimeout to HeartbeatInterval
2014-01-27 07:21:33 -08:00
Ben Johnson
5ec8c0d4eb
Merge pull request #167 from xiangli-cmu/dev
...
more safety
2014-01-27 07:18:39 -08:00
Xiang Li
bdeac89463
leader must stop all heartbeat routines before stepdown and truncate its log
2014-01-27 09:05:54 -05:00
Xiang Li
605f6716d7
fix(peer.go) Make sure we use the leader's term to create AppendEntriesRequest.
...
We do not stop the heartbeats before increases the term of the leader. It is possible that the even after
the state check, the leader stepsdown and use the new term to send out a AppendEntries request. We fixed this by recording the term when it is the leader(if it is not the leader at that time, flush() will return in the if statement).
2014-01-24 09:34:27 -05:00
Brandon Philips
6ce38579a4
fix(*.go): rename HeartbeatTimeout to HeartbeatInterval
...
While re-reading the etcd tuning guide I realized that perhaps it is a
bit of a misnomer to call this a "Timeout" since unlike the "Election
Timeout" there is no immediate consequence of it being missed.
Perhaps naming it interval would be better?
2014-01-23 13:22:41 -08:00
Xiang Li
0a20921dcb
Merge pull request #165 from philips/add-comment-on-nop-command
...
docs(server): add a comment explaining the NOPCommand
2014-01-23 13:07:08 -08:00
Brandon Philips
5b5fc705be
docs(server): add a comment explaining the NOPCommand
2014-01-23 12:42:06 -08:00
Ben Johnson
3a5d9096fc
Merge pull request #164 from xiangli-cmu/bug_fix
...
bug fix
2014-01-23 11:53:27 -08:00
Xiang Li
2987111400
bug fix
2014-01-23 14:45:04 -05:00
Xiang Li
b5dbd6e4a7
Merge pull request #163 from xiangli-cmu/bug_fix
...
p.server instead of server
2014-01-23 11:14:46 -08:00
Xiang Li
46491a8686
p.server instead of server
2014-01-23 14:13:41 -05:00
Ben Johnson
40544a875a
Merge pull request #162 from xiangli-cmu/bug_fix
...
fix peer ae.response bug
2014-01-23 10:48:51 -08:00
Xiang Li
6ffaa2484c
more docs
2014-01-23 11:50:09 -05:00
Xiang Li
0916bba25a
fix peer ae.response bug
2014-01-23 11:45:41 -05:00
Ben Johnson
ad05eb4872
Merge pull request #151 from xiangli-cmu/refactor_proto
...
WIP Refactor proto
2014-01-23 06:18:29 -08: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
Ben Johnson
639ffa394f
Merge pull request #159 from goraft/fix_log_open_recovery
...
fix(log_entry.go) reports the right read size
2014-01-22 06:04:01 -08:00
Xiang Li
083797fc39
fix(log_entry.go) reports the right read size(including the length field puls a newline char)
2014-01-22 09:01:42 -05:00
Ben Johnson
cc8d0ca2c7
Merge pull request #157 from goraft/snapshot-testing
...
Add snapshot test coverage
2014-01-21 11:59:36 -08:00
Ben Johnson
ec09ee3ba0
Fix cover profile location.
2014-01-21 12:56:17 -07:00
Ben Johnson
5aa95dfde6
Merge branch 'master' of https://github.com/goraft/raft into snapshot-testing
...
Conflicts:
snapshot.go
2014-01-21 10:12:13 -07:00
Ben Johnson
1d66f6a111
Snapshot test coverage.
2014-01-21 10:00:59 -07:00
Xiang Li
cb78676b7e
Merge pull request #156 from bcwaldon/HeartbeatEventType
...
feat(event): Add HeartbeatEventType
2014-01-21 08:27:43 -08:00
Brian Waldon
15dd02e3f9
feat(event): Add HeartbeatEventType
2014-01-21 08:24:28 -08:00
Ben Johnson
116a007266
Add Drone.io & Coveralls badges.
2014-01-19 14:57:49 -07:00
Ben Johnson
175a2dfc92
Merge pull request #154 from influxdb/http-transport-snapshot-support
...
handle Snapshot and SnapshotRecovery requests in the http transporter
2014-01-18 17:29:25 -08:00
John Shahid
4157c675e0
handle Snapshot and SnapshotRecovery requests in the http transporter
2014-01-17 14:05:12 -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
Xiang Li
8ca39ae223
fix(util.go) make writeFileSynced return error properly
2014-01-15 20:26:54 +08:00
Xiang Li
d08ec1d03f
Merge pull request #152 from xiangli-cmu/refactor_processCommand
...
Refactor process command
2014-01-15 03:44:50 -08:00
Brandon Philips
edb2b5c186
Merge pull request #153 from bcwaldon/fix-log-statement
...
fix(logging): Fix malformed log statement
2014-01-13 13:20:47 -08:00
Brian Waldon
6b0e658226
fix(logging): Fix malformed log statement
2014-01-13 13:07:10 -08:00
Xiang Li
601a799693
do not make map twice
2014-01-12 16:05:31 +08:00
Xiang Li
4aa1042d78
refactor(server.go) Leader do not need to send its own response of receiving a command to itself.
...
We send response to itself before, since it is a simple way to deal one machine cluster. After a little modification, we do not need to do this anymore.
2014-01-12 16:01:38 +08:00
Xiang Li
c906836cfa
in progress
2014-01-12 15:40:55 +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
52bdfb6e8d
switch to use gogoprotobuf
2014-01-11 20:21:54 +08:00
Xiang Li
8558533fa5
Merge branch 'master' of https://github.com/goraft/raft
2014-01-11 07:11:42 +08:00
Ben Johnson
fc9fafbace
Merge pull request #148 from xiangli-cmu/fix_test
...
test(server_test.go) Fix a deadlock.
2014-01-10 08:22:45 -08:00
Xiang Li
4a4b7391a3
Save config file atomically
2014-01-10 20:49:33 +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
5cf2325c04
Merge branch 'master' of https://github.com/goraft/raft
2014-01-10 18:49:12 +08:00
Xiang Li
8b5f68b899
Merge pull request #149 from xiangli-cmu/spelling_fix
...
Fix spelling mistake in snapshot.go comment
2014-01-10 02:47:56 -08:00
Baruch Even
caaebb1b56
Fix spelling mistake in snapshot.go comment
2014-01-10 18:47:14 +08:00
Xiang Li
a778d942b3
test(server_test.go) Fix a deadlock.
...
We stop all the servers before finishing the MultiNode test. The mock transporter directly calls to the function of the target server. If the target is stopped, the transporter will just hang there waiting for a reply. So the sender server will also hang for a reply. We add a timeout for the reply to solve this problem.
2014-01-10 18:05:09 +08:00