19 Commits

Author SHA1 Message Date
Changkun Ou
856097181b raft/rafttest: simulate async send in node test
In order to cover message can well be received when a node is paused, this commit sends message async using goroutine and random sleep. This change makes recvms is possible to cache message during node.pause is triggered.
2019-07-13 16:22:33 +02:00
Gyuho Lee
34bd797e67 *: revert module import paths
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6 go modules: Fix module path version to include version number 2019-04-26 15:29:50 -07:00
Nathan VanBenschoten
f89b06dc6d raft: provide protection against unbounded Raft log growth
The suggested pattern for Raft proposals is that they be retried
periodically until they succeed. This turns out to be an issue
when a leader cannot commit entries because the leader will continue
to append re-proposed entries to its log without committing anything.
This can result in the uncommitted tail of a leader's log growing
without bound until it is able to commit entries.

This change add a safeguard to protect against this case where a
leader's log can grow without bound during loss of quorum scenarios.
It does so by introducing a new, optional ``MaxUncommittedEntriesSize
configuration. This config limits the max aggregate size of uncommitted
entries that may be appended to a leader's log. Once this limit
is exceeded, proposals will begin to return ErrProposalDropped
errors.

See cockroachdb/cockroach#27772
2018-10-13 23:25:05 -04:00
Gyuho Lee
bb60f8ab1d raft: change import paths to "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:52 -07:00
Gyu-Ho Lee
f65aee0759 *: replace 'golang.org/x/net/context' with 'context'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Xiang Li
e5987dea37 rafttest: make raft test reliable 2016-11-04 15:55:17 -07:00
Gyu-Ho Lee
fe884f8209 raft: update LICENSE header 2016-05-12 20:49:15 -07:00
Anthony Romano
bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Jonathan Boulle
7848ac3979 *: add missing license headers 2015-09-15 14:09:01 -07:00
Xiang Li
3f867bc6ed raft: node bench matches reality 2015-03-28 14:53:42 -07:00
Iago López Galeiras
e698192e4a rafttest: fix build error
raftLogger is not exported so we can't access it from here. Go back to
using log.
2015-03-12 11:47:13 +01:00
Xiang Li
97579e2e1d raft: introduce logger interface 2015-03-08 21:36:32 -07:00
Xiang Li
fa66055f66 rafttest: drop isPaused 2015-02-09 18:52:34 -08:00
Xiang Li
085b608de9 rafttest: support node pause 2015-02-09 16:26:43 -08:00
Xiang Li
279b216f9a raftest: wait for network sending 2015-02-09 15:52:16 -08:00
Xiang Li
83edf0d862 rafttest: separate network interface and network 2015-02-03 22:50:27 -08:00
Xiang Li
b147a6328d raftest: add restart and related simple test 2015-02-03 10:08:52 -08:00
Xiang Li
d65af21b73 raft: add raft test suite 2015-02-01 14:53:22 -08:00