10677 Commits

Author SHA1 Message Date
fanmin shi
ba52bd07ba grpcproxy: add lease coalescing support 2017-02-16 11:50:50 -08:00
fanmin shi
05b82f2022 grpcproxy: refactor chan stream out of watch_client_adapter 2017-02-16 11:41:21 -08:00
Anthony Romano
49a12371c1 Merge pull request #7335 from heyitsanthony/leadership-kick
grpcproxy: support forcing leader as available
2017-02-16 09:40:08 -08:00
Brandon Philips
4608210154 Documentation/libraries-and-tools: add vitess 2017-02-15 21:35:19 -08:00
Anthony Romano
80de75431e grpcproxy: support forcing leader as available
Leadership timeout can sometimes take too long, such as in test cases.
However, it is possible to infer a leader is available based on RPCs
that must go through consensus. Therefore, have a way to update the
leadership status off the watch path.
2017-02-15 16:49:41 -08:00
Anthony Romano
2510a1488c Merge pull request #7327 from heyitsanthony/fix-runtime-conf-doc
op-guide: fix remove instructions in runtime-configuration and conform to style
2017-02-15 10:22:47 -08:00
Anthony Romano
2f8b9ce9aa Merge pull request #7314 from heyitsanthony/fix-leadership
grpcproxy: split out / tighten up leadership detection
2017-02-15 07:01:38 -08:00
Anthony Romano
a4a8393cb7 integration: wait five elections before creating watch for require leader test
Otherwise new watch will race with the leader watcher receiving the loss event.
2017-02-15 00:16:25 -08:00
Anthony Romano
36f5b713bf grpcproxy: don't wait for ctx.Done() to close kv donec
Causes a goroutine leak in ActiveConnection.Close() tests. Channel is
vestigial since removing ccache; revisit if kv ever needs goroutines.
2017-02-15 00:16:25 -08:00
Anthony Romano
49a0a63fc3 grpcproxy: split out leadership detection code
Move out of watch code since will be shared with lease code. Also assumes
leader does not exist unless watch can be successfully created.
2017-02-15 00:16:25 -08:00
fanmin shi
ad1b754e02 Merge pull request #7330 from fanminshi/fix_keepAliveOnce
clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0
2017-02-14 15:42:18 -08:00
fanmin shi
8cb5e05fc9 clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0 2017-02-14 15:19:29 -08:00
Anthony Romano
67e3fc55d7 op-guide: fix remove instructions in runtime-configuration and conform to style
Fixes #7326
2017-02-14 13:41:51 -08:00
Anthony Romano
78d153fc5a Merge pull request #7328 from heyitsanthony/travis-spam
travis: disable email notifications
2017-02-14 12:33:32 -08:00
Anthony Romano
2cc273291d travis: disable email notifications
Was spamming security@coreos.com
2017-02-14 12:08:49 -08:00
Hitoshi Mitake
808ee4e57c Merge pull request #7313 from gyuho/simplify-auth
auth: simplify merging range perm
2017-02-14 14:18:06 +09:00
Xiang Li
3d994f8653 Merge pull request #7317 from petermattis/pmattis/ready-must-sync
raft: add Ready.MustSync
2017-02-13 17:53:08 -08:00
Anthony Romano
c200be6432 Merge pull request #7319 from heyitsanthony/fix-compact-watch
grpcproxy: respect CompactRevision in watcher
2017-02-13 16:46:34 -08:00
Gyu-Ho Lee
e0ddded077 auth: simplify merging range perm
No need of separate function to filter duplicates.
Just merge ranges in-place

```
go test -v -run=xxx -bench=BenchmarkMergeOld -benchmem
BenchmarkMergeOld-8   	  100000	     13524 ns/op	    1104 B/op	       8 allocs/op

go test -v -run=xxx -bench=BenchmarkMergeNew -benchmem
BenchmarkMergeNew-8   	  100000	     13432 ns/op	     936 B/op	       3 allocs/op
```

Not much performance boost, but less memory allocation
and simpler
2017-02-13 16:37:43 -08:00
Anthony Romano
853f68071b grpcproxy: respect CompactRevision in watcher
CompactRevision wasn't sent over watch stream, causing TestKVCompact to hang.
2017-02-13 15:43:41 -08:00
Anthony Romano
43740a8d3c Merge pull request #7318 from heyitsanthony/limit-doc
etcdserverpb, clientv3: clarify WithLimit documentation
2017-02-13 15:35:37 -08:00
Anthony Romano
e52a985a3a Merge pull request #7307 from heyitsanthony/proxy-countonly
grpcproxy: support CountOnly
2017-02-13 13:30:31 -08:00
Anthony Romano
fb7dd0f688 etcdserverpb, clientv3: clarify WithLimit documentation
Fixes #7316
2017-02-13 12:37:44 -08:00
Peter Mattis
ab03a42f06 raft: add Ready.MustSync
Add Ready.MustSync which indicates that the hard state and raft log
entries in a Ready message must be synchronously written to persistent
storage.
2017-02-13 15:13:21 -05:00
fanmin shi
2925f02aac Merge pull request #7305 from fanminshi/return_header_for_timetolive
lease: LeaseTimeToLive returns TTL=-1 resp on lease not found
2017-02-13 11:24:36 -08:00
fanmin shi
0d08ffa282 integration: don't expect lease not found error for TestV3GetNonExistLease 2017-02-10 17:35:43 -08:00
fanmin shi
bcfbb096e2 clientv3/integration: test lease not found on TimeToLive() 2017-02-10 16:41:47 -08:00
fanmin shi
2ca1823a96 v3rpc: LeaseTimeToLive returns TTL=-1 resp on lease not found 2017-02-10 16:33:31 -08:00
Anthony Romano
c22ba766d5 grpcproxy: support CountOnly
TestKVRange from client integration tests was failing.
2017-02-10 16:06:24 -08:00
Anthony Romano
9f8e82e1c0 Merge pull request #7304 from heyitsanthony/remove-ccache
Remove ccache
2017-02-10 16:02:31 -08:00
Anthony Romano
1fe2a9b124 Revert "Merge pull request #7139 from heyitsanthony/proxy-rlock"
This reverts commit 304606ab0bb009169b442dec6f9af76e4cd1e887, reversing
changes made to 7dfe503f1c86de755ca379e95922e43afacee923.
2017-02-10 14:37:48 -08:00
Xiang Li
47cb8a012a Merge pull request #7301 from ghostplant/master
Fix a command error.
2017-02-10 09:31:22 -08:00
cuiwei13
cc14f14216 Documentation: replace px typo with ps
Signed-off-by: CUI Wei <ghostplant@qq.com>
2017-02-11 00:23:37 +08:00
Gyu-Ho Lee
1a4a4fa7ac Merge pull request #7295 from mkumatag/fix_gosimple
test: Fix gosimple errors
2017-02-09 07:39:55 -08:00
Gyu-Ho Lee
98249bc950 Merge pull request #7297 from mkumatag/update_travis
travis: Update fmt check gotools
2017-02-09 07:26:00 -08:00
Manjunath A Kumatagi
5afa4e4fdf travis: Update fmt check gotools 2017-02-09 10:17:36 -05: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
Xiang Li
c4fc8c0989 Merge pull request #7260 from mitake/auth-state
auth: correct initialization in NewAuthStore()
2017-02-08 18:11:13 -08:00
fanmin shi
9b72c8ba1b Merge pull request #7285 from fanminshi/uses_direct_client_call_for_tests
clientv3: integration test uses direct client calls
2017-02-07 12:09:37 -08:00
fanmin shi
366e689eae clientv3: uses direct client calls in integration tests
clientv3 integration test was using clientv3.NewKV, clientv3.NewWatcher, etc to create specific client.
replace those with direct client calls so that the direct calls can also test grpc proxy.
2017-02-07 11:09:19 -08:00
fanmin shi
0944a50d3f Merge pull request #7288 from fanminshi/fix_TestLeaseKeepAliveInitTimeout_test
clientv3/integration:  stop member before keepalive in TestLeaseKeepAliveInitTimeout
2017-02-07 10:48:54 -08:00
fanmin shi
c182428e52 clientv3/integration: stop member before keepalive in TestLeaseKeepAliveInitTimeout 2017-02-07 10:07:03 -08:00
Gyu-Ho Lee
bf5ecf6555 Merge pull request #7262 from mkumatag/ppc64le_binary
scripts: Add support to build ppc64le binary for release
2017-02-07 09:52:12 -08:00
Anthony Romano
cf5cc18f02 Merge pull request #7286 from heyitsanthony/lease-snip-cancel-stop
clientv3: remove cancelWhenStop from lease implementation
2017-02-07 09:12:34 -08:00
Anthony Romano
a213b3abf5 clientv3: remove cancelWhenStop from lease implementation
Only have Close() cancel out outstanding goroutines. Canceling out
single-shot RPCs will mask connection close on client.Close().
2017-02-06 17:21:46 -08:00
Anthony Romano
739accc242 Merge pull request #7281 from heyitsanthony/no-default-ka
clientv3: only start lease stream after first keepalive call
2017-02-06 13:51:43 -08:00
Anthony Romano
a9f10bdeee clientv3: only start lease stream after first keepalive call
Fixes #7274
2017-02-06 11:52:57 -08:00
Hitoshi Mitake
9976d869c1 auth: correct initialization in NewAuthStore()
Because of my own silly mistake, current NewAuthStore() doesn't
initialize authStore in a correct manner. For example, after recovery
from snapshot, it cannot revive the flag of enabled/disabled. This
commit fixes the problem.

Fix https://github.com/coreos/etcd/issues/7165
2017-02-06 16:05:49 +09:00
Hitoshi Mitake
280b65fe4d auth: add a test case for recoverying from snapshot 2017-02-06 15:42:09 +09:00
Xiang Li
6fb99a8585 Merge pull request #7276 from fanminshi/fix_lease_keep_alive_loop
clientv3: sends keepalive reqs immediately after lease keep alive stream reset
2017-02-04 21:28:56 -08:00