Commit Graph

662 Commits (fb85da92e80d5f9d34ae8827360c2e5650dd31a0)

Author SHA1 Message Date
Anthony Romano dc17eaace7 *: rename Lease Create to Grant
Creating a lease through the client API interface union looked like
"c.Create(...)"-- the method name wasn't very descriptive.
2016-04-07 12:28:14 -07:00
Gyu-Ho Lee 6e6d64fb9b *: clean up unused vars, functions
With help from https://github.com/dominikh/go-unused.
IsNetTimeoutError seems useful, so moved to pkg/netutil.
2016-04-06 21:33:55 -07:00
Tamir Duberstein 68db18667a raft: correct doc comment 2016-04-06 08:43:42 -04:00
Tamir Duberstein 5250784b09 raft: use rand.Intn instead of rand.Int and mod
This provides a better random distribution and is easier to read.
2016-04-06 08:43:42 -04:00
Gyu-Ho Lee c09f23c46d *: clean up bool comparison 2016-04-02 18:27:54 -07:00
Xiang Li 5d431b4782 raft: lower split vote rate 2016-04-01 12:11:03 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Xiang Li f5e60c0e18 raft: add optimization notes 2016-03-17 09:53:50 -07:00
Xiang Li aa59e7518e raft: remove unnecessary waitSchedule in test 2016-03-09 09:18:49 -08:00
Peter Bourgon aedf2c5876 raft: Config: comment wrapping @ 80col 2016-03-01 09:54:58 +01:00
Peter Bourgon 6c1b3a71db raft: clarify Heartbeat/ElectionTick comments
Avoid other, ambiguous interpretations.
2016-03-01 09:52:14 +01:00
Anthony Romano afa0368dcc *: fix godoc bugs in interfaces and slice fields
detected with goword
2016-02-24 00:45:40 -08:00
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