Anthony Romano
c5b51946eb
*: exported godoc fixups
2016-02-21 20:36:44 -08:00
Xiang Li
390a4518c0
raft: rework comment for advance interface
2016-02-12 13:43:51 -08:00
Anthony Romano
20461ab11a
*: fix many typos
2016-01-31 21:42:39 -08:00
Gyu-Ho Lee
c827c7432c
raft: fix leaky goroutines in raft test
2016-01-31 12:41:33 -08:00
Gyu-Ho Lee
71c2a9bb3c
*: fix minor typos, comments
2016-01-30 18:15:56 -08:00
Shawn Smith
edd823bba6
raft: fix var name in comment
2016-01-29 16:18:47 +09:00
Xiang Li
37290820de
Merge pull request #4293 from bdarnell/bcast-after-commit
...
raft: Always call bcastAppend after maybeCommit
2016-01-27 09:58:22 -08:00
Sam Rijs
be21d90108
raft/doc: add notice about thread safety of messages
...
Fixes #4285
2016-01-27 20:18:19 +11:00
Xiang Li
6054748181
Merge pull request #4297 from ngaut/ngaut/raft-typo
...
raft: typo
2016-01-26 20:48:53 -08:00
ngaut
751ab40f44
raft: typo
2016-01-27 12:35:14 +08:00
Gyu-Ho Lee
a35d5889f6
*: update gRPC, proto interface
2016-01-26 17:41:39 -08:00
Ben Darnell
0771d713e6
raft: Always call bcastAppend after maybeCommit
2016-01-26 16:55:47 -05:00
Ben Darnell
22925a1d2f
raft: Remove redundant raft.Commit
field.
...
Keeping this field in sync with `raft.raftLog.committed` was
error-prone, so instead we synthesize the `HardState` on demand.
Fixes #4278 .
2016-01-26 15:18:55 -05:00
Xiang Li
8199147cf8
Merge pull request #4246 from bdarnell/commit-after-remove-node
...
raft: Call maybeCommit after removing a node
2016-01-25 11:47:56 +08:00
Sam Rijs
896719c877
raft: use configured logger in raft/node.go
...
Those three log statements in node.go have not been using the logger that was passed via `raft.Config`, but instead the default raft logger. This changes it to use the proper logger.
2016-01-25 00:15:44 +11:00
Gyu-Ho Lee
53d6aede82
Merge pull request #3889 from gyuho/raft_doc.go_20151118
...
raft: doc, debugging instruction on MessageType
2016-01-22 14:22:49 -08:00
Ben Darnell
46bb2582fe
raft: Call maybeCommit after removing a node.
...
removeNode reduces the required quorum size, so some pending entries may
be able to commit after it is applied.
Discovered in cockroachdb/cockroach#3642
2016-01-20 11:05:48 -04:00
Ben Darnell
c185bdaf95
raft: Improve formatting of DescribeMessage
2016-01-20 11:03:07 -04:00
davygeek
194607812c
raft: follow golint notice to replace +=1 with ++
2016-01-13 09:39:00 +08:00
Xiang Li
eab052d5c4
Merge pull request #4141 from ngaut/ngaut/refactor
...
raft: Rename q() to quorum() which is more readable
2016-01-06 07:32:39 -08:00
siddontang
54a45ba2f5
*: fix typo
2016-01-06 16:17:02 +08:00
ngaut
8ee232d4ec
raft: Rename q() to quorum() which is more readable
2016-01-06 15:23:35 +08:00
ngaut
b38dfda1c9
raft: Tiny refactor
...
Rename i to id since i looks like index which is confusing.
2016-01-04 21:20:54 +08:00
ngaut
acee23112a
raft: typo
2016-01-04 11:51:51 +08:00
Jonathan Boulle
5c65c393a5
raft: small typo fixes in raft package doc
2015-12-23 16:37:06 +01:00
Brandon Philips
c72e4ae112
raft: add raftexample to the docs
...
To help people wanting use this package get started point to the
raftexample package.
2015-12-22 12:04:39 -08:00
Hitoshi Mitake
9b2da76796
raft: remove go vet compliants
2015-12-16 13:29:23 +09:00
Gyu-Ho Lee
8696a1509c
raft/rafttest: fix shadowed variable
2015-12-12 09:38:26 -08:00
Jonathan Boulle
af9f352fe3
raft: update RecentActive name in comments
...
Noticed when retrospectively reviewing #3976 that a couple of places
were missed when the variable was renamed.
2015-12-11 15:06:11 -08:00
Xiang Li
cc6d98bf89
etcdserver: only send snapshot when the member is active
2015-12-10 16:15:26 -08:00
Xiang Li
9df46f9d6f
raft: expose RecentActive in Progress
2015-12-10 12:17:18 -08:00
Bram Gruneir
1901a4c718
raft: Ensure that Progress is not nil when a MsgSnapStatus comes in.
...
This was causing some issues in cockroach cockroachdb/cockroach#2950
2015-12-07 16:01:18 -05:00
Gyu-Ho Lee
d817f885db
raft: doc, debugging instruction on MessageType
...
This adds documentation on MessageType. Having clear explanation about
MessageType helps understand raft logic and debug etcd when there is a
message dropping. This is partially for coreos#3806.
2015-12-03 00:45:11 -08:00
es-chow
5bc56786dc
raft: add RawNode which is a thread-unsafe node without goroutine and remove MultiNode
2015-11-26 17:14:14 +08:00
Xiang Li
a8cc1570d0
raft: support quorum check when raft is leader
...
If quorum check fails, the leader will step down to follower.
2015-11-24 09:36:37 -08:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Gyu-Ho Lee
e1c108e604
raft: minor typo in progress.go
...
Fixes a minor typo.
2015-11-17 14:21:35 -08:00
Xiang Li
5d0268aa2e
Merge pull request #3877 from bdarnell/campaign-while-leader
...
raft: no-op instead of panic for Campaigning while leader
2015-11-16 19:59:34 -08:00
Ben Darnell
fbeb58d265
raft: no-op instead of panic for Campaigning while leader
...
We need to be able to force an election (on one node) after creating a
new group (cockroachdb/cockroach#1384 ), but it is difficult to ensure
that our call to Campaign does not race with an election that may be
started by raft itself. A redundant call to Campaign should be a no-op
instead of a panic. (But the panic in becomeCandidate remains, because
we don't want to update the term or change the committed index in this
case)
2015-11-16 21:44:14 -05:00
Yicheng Qin
3a65442d7d
raft: fix print format for term in one log line
...
`term` should be printed in decimal representation instead of
hexadecimal one.
2015-11-15 20:26:16 -08:00
Xiang Li
2990249c1d
Merge pull request #3856 from xiang90/raft_doc_restart
...
raft: add doc to make restart clear
2015-11-11 11:15:49 -08:00
Xiang Li
f7f28b9984
raft: add doc to make restart clear, especially for configuration changed case
2015-11-11 11:11:58 -08:00
Xiang Li
6df52614fc
raft: add more words about raft protocol
2015-11-11 09:20:25 -08:00
Yicheng Qin
0de52414cd
raft: extend wait timeout in TestNodeAdvance
...
This fixes the failure met in semaphore CI.
2015-11-03 16:57:18 -08:00
Yicheng Qin
bf3057e5bd
raft: extend wait timeout in TestMultiNodeAdvance
...
This fixes the failure met in semaphore CI:
```
--- FAIL: TestMultiNodeAdvance-2 (0.01s)
multinode_test.go:458: expect Ready after Advance, but there is
no Ready available
```
2015-10-23 12:08:24 -07:00
Yicheng Qin
01806c3e80
raft: fix malformed example name
...
It is reported by latest govet:
```
gopath/src/github.com/coreos/etcd/raft/example_test.go:26: Example_Node
has malformed example suffix: Node
```
2015-10-20 16:40:01 -07:00
Gyu-Ho Lee
1716d5858f
raft/documentation: clarify progress's subjects.
...
If I understand correctly, `progress` represents the states of follower. For
me, some comments weren't clear because it was missing the subjects of
`progress`. This adds more clarification on who is doing what. Please let me
know if I misunderstood anything. Thanks,
2015-10-15 19:15:08 -07:00
Cong Ding
362df8e470
raft/doc: fix misuse of `for' loop in docs
2015-10-15 11:13:30 -05:00
Cong Ding
f1f92f0fa3
raft/doc: fix typos
2015-10-15 02:17:34 -05:00
Kenji Kaneda
ebd8cb04c1
raft: fix a description of MemoryStorage.Compact
...
The parameter name is compactIndex, not i.
2015-10-06 21:49:33 -07:00