6 Commits

Author SHA1 Message Date
Anthony Romano
887db5a3db *: fix go tool vet -all -shadow errors 2017-06-03 21:32:36 -07:00
fanmin shi
87d99fe038 etcd-runner: remove mutex on validate() and release() in global.go
election runner can deadlock in atomic release().

suppose election runner has two clients A and B.
if A is a leader and B is a follower, B obtains lock
for release() and waits for A to close(nextc) which signal
next round is ready. However, A can only close(nextc) if it
obtains lock for release(); hence deadlock.

this pr removes atomicity of validate() and release() in global.go
and gives the responsibility of locking to each runner.

FIXES #7891
2017-05-09 15:38:13 -07:00
fanmin shi
fa85445ef8 etcd-runner: add rate limiting in doRounds() 2017-04-25 14:00:52 -07:00
Manjunath A Kumatagi
0914b8b707 test: Fix gosimple errors
Getting gosimple suggestion while running test script, so this PR is for fixing gosimple S1019 check.
raft/node_test.go:456:40: should use make([]raftpb.Entry, 1) instead (S1019)
raft/node_test.go:457:49: should use make([]raftpb.Entry, 1) instead (S1019)
raft/node_test.go:458:43: should use make([]raftpb.Message, 1) instead (S1019)

Refer https://github.com/dominikh/go-tools/blob/master/cmd/gosimple/README.md#checks for more information.
2017-02-09 08:01:28 -05:00
sharat
d0f301adb7 etcd-runner:add flags in watcher for hardcoded values 2017-01-04 15:17:53 +05:30
sharat
5cb6dd268b etcd-runner: make command compliant 2017-01-03 14:43:58 +05:30