Yicheng Qin
ff6705b94b
raft: add Configure, AddNode, RemoveNode
...
Configure is used to propose config change. AddNode and RemoveNode is
used to apply cluster change to raft state machine. They are the
basics for dynamic configuration.
2014-09-22 15:43:13 -07:00
Yicheng Qin
f2ebd64a1b
*: add testutil pkg
2014-09-19 14:32:38 -07:00
Jonathan Boulle
b66a40495d
raft: introduce Node interface
2014-09-17 14:18:56 -07:00
Xiang Li
ab61a8aa9a
*: init for on disk snap support
2014-09-17 13:56:12 -07:00
Yicheng Qin
de21c39ca5
raft: isStateEqual -> isHardStateEqual, IsEmptyState -> IsEmptyHardState
2014-09-16 13:55:00 -07:00
Yicheng Qin
023dc7cba2
etcdserver: add SYNC request
2014-09-16 13:42:03 -07:00
Yicheng Qin
cc8d8f2102
raft: remove unused raftpb.LastIndex
2014-09-15 14:34:23 -07:00
Yicheng Qin
9607665323
raft: remove unused return
2014-09-15 13:22:21 -07:00
Yicheng Qin
9bf2c2ed9d
Merge pull request #1052 from unihorn/121
...
server: add unit tests
2014-09-15 13:20:50 -07:00
Yicheng Qin
6cd4434ff3
server: add unit tests
...
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
Xiang Li
f9c12e2053
Merge pull request #1075 from coreos/fix_heartbeat
...
raft: fix heartbeat
2014-09-15 10:04:12 -07:00
Yicheng Qin
38c074cb05
Merge pull request #1067 from unihorn/122
...
raft: write entry 0 into log
2014-09-15 10:00:49 -07:00
Xiang Li
21d116d3e1
raft: fix heartbeat
2014-09-15 09:58:22 -07:00
Yicheng Qin
140fd6d6c4
raft: restart using last written entry also
2014-09-15 09:56:33 -07:00
Yicheng Qin
a9af70c52b
raft: write entry 0 into log
2014-09-15 09:55:52 -07:00
Xiang Li
29f9372370
Merge pull request #1080 from coreos/check_id
...
main: check node id is not noneid
2014-09-14 23:28:39 -07:00
Xiang Li
e7ea6a374a
main: check node id is not noneid
2014-09-14 23:28:11 -07:00
Xiang Li
ff7f340bba
Merge pull request #1063 from coreos/node_run_test
...
raft: test node block proposal
2014-09-14 22:46:50 -07:00
Xiang Li
e085cc4e06
Merge pull request #1042 from unihorn/118
...
raft: set none to be 0
2014-09-14 22:32:37 -07:00
Yicheng Qin
2927cc6e3b
raft: refine plus assignment
2014-09-14 22:07:32 -07:00
Yicheng Qin
da575c46fa
raft: remove unused field
2014-09-14 13:08:35 -07:00
Yicheng Qin
34db45a948
raft: set propc, readyc to be nil before run loop
2014-09-12 12:57:50 -07:00
Xiang Li
ccee264b7d
raft: move defer after run
2014-09-12 12:28:15 -07:00
Xiang Li
45f56a5377
raft: forceGoSched -> forceGosched
2014-09-12 12:27:18 -07:00
Brandon Philips
df253a2b14
Merge pull request #1066 from philips/add-raft-doc
...
add-raft-doc
2014-09-12 12:21:53 -07:00
Xiang Li
5c884c7797
raft: better comment and naming
2014-09-12 12:18:30 -07:00
Xiang Li
0c09862494
raft: add isStateEqual test
2014-09-12 11:59:32 -07:00
Xiang Li
f9ef453894
raft: test contain updates
2014-09-12 11:51:25 -07:00
Xiang Li
b261a5edc1
raft: test node block proposal
2014-09-12 11:51:25 -07:00
Yicheng Qin
30289dad5c
raft: more descriptive panic info
2014-09-12 11:39:53 -07:00
Yicheng Qin
072a21782e
Merge pull request #1049 from unihorn/120
...
raftLog: enhance check in compact
2014-09-12 11:35:41 -07:00
Yicheng Qin
d31443f5a3
raftLog: compact applied entries only
...
compact MUST happen on entries that have been applied, or
1. it may screw up the log by setting wrong commitIndex
2. discard unapplied entries
2014-09-12 11:34:08 -07:00
Brandon Philips
98f9ee3613
raft: add useful comments
...
These comments were things I learned about the units, use case or
meaning of various fields and functions in the raft package.
2014-09-12 09:58:04 -07:00
Brandon Philips
58b8610024
raft: add a doc.go file
...
Explain the package from a high level.
2014-09-12 09:57:48 -07:00
Yicheng Qin
073411f23f
raft: remove vote with default value
2014-09-11 23:17:13 -07:00
Yicheng Qin
dc1357afa9
raft: use raft helper function in testing
2014-09-11 19:26:29 -07:00
Yicheng Qin
0e0fc2bd24
raft: use [1,n] as address list for raft state machines
2014-09-11 19:23:05 -07:00
Yicheng Qin
84c2bd0b7d
raft: set From of local message to be local id
2014-09-11 19:18:47 -07:00
Xiang Li
281afa74ee
raft: comments for TestNodeStep
2014-09-11 19:00:40 -07:00
Xiang Li
eb1dcb324c
raft: test node step
2014-09-11 17:10:36 -07:00
Brandon Philips
3bc4b2db12
raft: log comment grammar fix
2014-09-11 13:59:50 -07:00
Yicheng Qin
4e31bb308d
raft: use const firstId to track ids
2014-09-09 19:07:20 -07:00
Yicheng Qin
b50f96e2e1
raft: set none to be 0
2014-09-09 16:47:21 -07:00
Xiang Li
eaffaacf5e
raft: do not need to copy committed entries
2014-09-09 14:09:30 -07:00
Xiang Li
676b5be972
raft: use IsEmptyState
2014-09-09 11:58:15 -07:00
Xiang Li
ac0443bc89
raft: remove extra code
2014-09-09 10:16:39 -07:00
Xiang Li
df259e5878
raft: add a newReady helper function
2014-09-09 10:16:39 -07:00
Xiang Li
90c0db3d42
wal: do not save empty state
2014-09-09 10:15:29 -07:00
Xiang Li
c28fef5fc4
raft: set ready.st to empty state, if current state is equal to previous state
2014-09-09 10:15:29 -07:00
Xiang Li
b0d865e845
raft: record previous state is enough
2014-09-09 10:15:29 -07:00