Commit Graph

715 Commits (4835322aa1f45c30d5299c504ba109b2a2833d7e)

Author SHA1 Message Date
Gyu-Ho Lee 5b92e17e86 *: regenerate proto files 2016-07-15 13:24:19 -07:00
Xiang Li 7432e9fbe9 Merge pull request #5809 from swingbach/master
raft: make leader transferring workable when quorum check is on
2016-07-12 09:46:18 -07:00
Xiang Li b2c1112288 Merge pull request #5921 from xiang90/r
raft: do not change RecentActive when resetState for progress
2016-07-12 06:54:14 -07:00
swingbach@gmail.com c36a40ca15 raft: introduce top-level context in message struct 2016-07-12 16:14:06 +08:00
Xiang Li eb08f2274e raft: do not change RecentActive when resetState for progress 2016-07-11 21:12:14 -07:00
Gyu-Ho Lee 6f3a40cb53 raft: set leader id in stepFollower
Follower has already set its leader ID from
previous append messages from the leader, but
to be consistent,  this adds a line to set its
leader id from leader snapshot message.
2016-07-11 16:37:31 -07:00
swingbach@gmail.com 0d9b6ba0ab raft: fix a few problems 2016-07-11 14:59:53 +08:00
Gyu-Ho Lee c396b6aaaa raft: remove unnecessary type-cast, else-clause 2016-07-09 22:01:19 -07:00
Jared Hulbert 90889ebc0f raftpb: atomic access alignment
The Entry struct has misaligned fields that are accessed atomically.  The
misalignment is caused by the EntryType enum which the Protocol Buffers
spec forces to be a 32bit int.

Moving the order of the fields without renumbering them in the .proto file
seems to align the go structure without changing the wire format.
2016-07-08 11:13:53 -07:00
Jared Hulbert df94f58462 raft: atomic access alignment
The relevant structures are properly aligned, however, there is no comment
highlighting the need to keep it aligned as is present elsewhere in the
codebase.

Adding note to keep alignment, in line with similar comments in the codebase.
2016-07-08 11:05:41 -07:00
Gyu-Ho Lee 9e0de02fde raft: fix minor grammar, remove TODO
- test 'Term' panic cases (remove TODO)
- fix minor grammar in 'Node' godoc
2016-07-05 07:21:52 -07:00
Gyu-Ho Lee 881a120453 raft: minor updates and clean up in log.go
- remove redundant test case in log_test.go
- fix test case comment ('equal or larger')
- lastnewi after matching index and term
2016-07-04 16:52:17 -07:00
Xiang Li 8d99a666f9 Merge pull request #5854 from xiang90/r_f
raft: add features section to readme file
2016-07-03 18:00:31 -07:00
Xiang Li c76dcc5190 raft: add features section to readme file 2016-07-03 17:59:59 -07:00
Gyu-Ho Lee 9b5e99efe0 raft: remove unnecessary reflect.DeepEqual in test 2016-07-03 13:42:26 -07:00
Xiang Li 40c4a7894d *: support return prev deleted kv 2016-07-01 14:01:48 -07:00
Gyu-Ho Lee 2cc2372165 raft: give correct offset in unstable test
`unstable.entries[i] has raft log position i+unstable.offset`

So, this fixes some test cases by giving them correct
offsets.
2016-06-29 12:29:36 -07:00
swingbach@gmail.com e020b2a228 raft: make leader transferring workable when quorum check is on 2016-06-29 18:24:58 +08:00
zhonglin6666 df31eab136 raft: simplify truncateAndAppend
truncateAndAppend no need the value of 'after' with subbing one
2016-06-28 18:53:12 -07:00
Xiang Li 5f1c763993 Merge pull request #5553 from swingbach/master
raft: implemented read-only query when quorum check is on
2016-06-28 12:47:43 -07:00
swingbach@gmail.com 0faae33ace raft: implemented read-only query when quorum check is on 2016-06-28 10:52:53 +08:00
Gyu-Ho Lee 6a48961895 raft: len(entries) before Lock, use firstIndex
- To avoid unnecessary locking in case len(entries) == 0
- use firstIndex method
2016-06-24 23:50:00 -07:00
Gyu-Ho Lee 33f7e7583b raft: fix comment,method name to needSnapshotAbort
And 'maybeSnapshotAbort' does not 'unset'
the pendingSnapshot. 'resetState', which is called after this
metho, is the one that unsets pendingSnapshot. So this changes
the method name.
2016-06-24 07:54:10 -07:00
Xiang Li 848f539536 raft: make tick unblock and fix potential live lock 2016-06-16 08:01:06 -07:00
Xiang Li 5a7b7f7595 main: add grpc-gateway support
Now etcd can serve HTTP json request at /v3alpha/
2016-06-14 17:09:06 -07:00
Xiang Li ab65d2b848 raft: add docker/swarmkit as notable raft users 2016-06-09 10:10:44 -07:00
Gyu-Ho Lee 1610391449 *: following changes for proto update 2016-06-07 13:33:03 -07:00
Gyu-Ho Lee 843c53192a raft: small fix in doc
'MsgBeat' is an internal type to signal the leader, not the message type
that gets sent to its followers. 'MsgHeartbeat' is the type sent to followers.
2016-06-05 17:47:46 -07:00
Xiang Li 500296d0fb raft: fix TestNodeStepUnblock
The test cases have side-effect. We need to stop testing if one of the test
fails. Also timeout should be much longer to avoid false-positive.
2016-06-03 10:22:11 -07:00
Xiang Li 9fee7732f6 Merge pull request #5468 from swingbach/master
implemented leader lease when quorum check is on.
2016-06-01 16:10:41 -07:00
swingbach@gmail.com 337ef64ed5 raft: implemented leader lease when quorum check is on 2016-06-02 06:17:27 +08:00
Xiang Li 5b2e130f09 raft: initial readme 2016-05-28 18:37:21 -07:00
swingbach@gmail.com ff9d16a2e0 raft: fix tiny mistake of message type 2016-05-20 14:04:08 +08:00
swingbach@gmail.com 1e54117580 raft: add more comments for dueling candidates test case 2016-05-19 13:51:20 +08:00
swingbach@gmail.com c703ccab63 raft: add more assertions for dueling candidates test case 2016-05-19 13:50:14 +08:00
Xiang Li 910781ef5b raft: do not panic when removing all the nodes from cluster 2016-05-16 10:04:17 -07:00
Xiang Li 4d2424210f Merge pull request #5313 from xiang90/fix_raft_abort
raft: simplify leadership transfer
2016-05-13 09:26:01 -07:00
Gyu-Ho Lee fe884f8209 raft: update LICENSE header 2016-05-12 20:49:15 -07:00
Xiang Li 82a6de8b69 raft: simplify leadership transfer 2016-05-10 20:03:42 -07:00
Gyu-Ho Lee 015acabdbb *: rerun genproto -g 2016-05-02 23:02:31 -07:00
Xiang Li 2fa5b913fe raft: fix flaky test
We recently changed the randomized election timeout from (et, 2*et-1] tp
[et, 2*et-2], where et is user set election timeout.

So 2*et might trigger two elections instead of one. We need to fix the test
code accordingly.

Thanks for Tikv guys for finding this issue. We probably need to randomize
etcd/raft test more.
2016-05-02 21:08:19 -07:00
Anthony Romano b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
Gyu-Ho Lee 4b31acf0e0 *: update generated Proto 2016-04-25 14:08:33 -07:00
Xiang Li 59c5110b73 raft: fix detected race in node.go 2016-04-22 15:45:33 -07:00
Jud White a9cfbd5414 raft/doc.go: add missing } 2016-04-19 04:21:33 -05:00
Gyu-Ho Lee 7a2ef3eb00 *: regenerate proto buffers 2016-04-13 16:24:07 -07:00
mqliang 1044fbce2c etcdctlv3: update aunto generated files 2016-04-12 22:48:47 +08:00
Xiang Li 3a695a82a3 Merge pull request #5036 from xiang90/r_t
raft: add a test case for Test Slice
2016-04-11 16:02:13 -07:00
Xiang Li 9423125ce1 raft: add a test case for Test Slice 2016-04-11 10:04:03 -07:00
Gyu-Ho Lee 9108af9046 *: clean up from go vet, misspell 2016-04-10 23:16:56 -07:00