15968 Commits

Author SHA1 Message Date
mlmhl
aa7b056a77 etcdctl: support query count only of specified prefix 2020-04-02 11:04:26 +08:00
Gyuho Lee
0941cfc11d CHANGELOG: add compaction updates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-01 12:05:00 -07:00
Gyuho Lee
0f1694c96f CHANGELOG*: add new patch release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-01 10:55:48 -07:00
Gyuho Lee
5ceb7019f8
Merge pull request #11738 from gyuho/wal-metrics
wal: add "etcd_wal_writes_bytes_total"
2020-04-01 09:08:10 -07:00
Jingyi Hu
054b0e5d93
Merge pull request #11735 from wswcfan/optimize-auth-lock-performance
auth: dramatically improve checkPassword performance
2020-04-01 23:24:35 +08:00
Gyuho Lee
381e77c667 CHANGELOG-3.5: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:34:16 -07:00
Gyuho Lee
af261f1a1b wal: add "etcd_wal_writes_bytes_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:31:32 -07:00
Gyuho Lee
4051e3e36a pkg/ioutil: add "FlushN"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:31:24 -07:00
shawwang
9cf3162d11 auth: optimize lock scope for CheckPassword
to improve authentication performance in concurrent scenarios when enable auth and using authentication based password
2020-04-01 02:21:26 +08:00
Gyuho Lee
dd816f0735 CHANGELOG-3.4: update release date
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-29 12:44:05 -07:00
Gyuho Lee
587e08822d CHANGELOG: add lease fix
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-29 12:38:04 -07:00
Gyuho Lee
2ffbde8376
Merge pull request #11731 from tangcong/fix-lease-memory-leak
lease: fix memory leak in LeaseGrant
2020-03-29 12:30:49 -07:00
tangcong
b1da829844 lease: fix memory leak in LeaseGrant when node is follower 2020-03-29 10:13:56 +08:00
Sahdev Zala
a04b74d4b4
Merge pull request #11639 from jingyih/linearizable_memberlist
*: serve member list API with linearizable guarantee
2020-03-27 11:13:58 -04:00
jingyih
0344b70906 *: make MemberList linearizable
- Add linearizable field to etcdserverpb.MemberListRequest.
- Change behavior of clienv3 MemberList API. Now it is served with
linearizable guarantee.
2020-03-25 20:16:20 -07:00
Gyuho Lee
3ac7a11515
Merge pull request #11699 from tangcong/refactor-consistentindex
*: refactor consistentindex
2020-03-25 18:07:44 -07:00
Gyuho Lee
3cea310b61
Merge pull request #11637 from eddycjy/update-changelog
CHANGELOG-3.5: update from #11564
2020-03-25 15:19:02 -07:00
Jingyi Hu
6325754d96
Merge pull request #11710 from tangcong/revert-rolegrantpermission
auth: ensure RoleGrantPermission is compatible with older versions
2020-03-25 23:17:34 +08:00
煎鱼
ef57a615ad
Merge branch 'master' into update-changelog 2020-03-25 15:02:24 +08:00
Gyuho Lee
71a241e876
Merge pull request #11715 from YoyinZyc/downgrade-api
[Etcd downgrade] Add downgrade related api in server side
2020-03-24 21:31:51 -07:00
tangcong
631c23d198 etcdserver/cindex: add unit test 2020-03-25 10:59:19 +08:00
tangcong
804070ce87 clientv3/snapshot: clean up initIndex 2020-03-25 10:59:19 +08:00
tangcong
7b2018683a *: refactor consistent index 2020-03-25 10:59:15 +08:00
tangcong
d70600feca auth: ensure RoleGrantPermission is compatible with older versions 2020-03-25 09:50:07 +08:00
Gyuho Lee
bbb0fcfae9
Merge pull request #11719 from fengpf/master
*: fix goroutines typos
2020-03-24 13:50:56 -07:00
Gyuho Lee
86e607a2cd
Merge pull request #11723 from gyuho/init
etcdmain: log "SdNotify" error/success
2020-03-24 13:50:34 -07:00
Gyuho Lee
2329acf05b etcdmain: log "SdNotify" error/success
I am seeing some silent failures around systemd service.
This will help find out bugs in "go-systemd"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-24 12:20:20 -07:00
fengpf
1f70c0b075 *: fix goroutines typos 2020-03-24 15:33:47 +08:00
yoyinzyc
073bc22d35 etcdserver: add downgrade api in maintenance server. 2020-03-22 22:35:08 -07:00
yoyinzyc
d8b9b54348 etcdserver: add downgrade rpc proto api. 2020-03-20 17:37:26 -07:00
mlmhl
0eee733220
mvcc: no need to hold tx lock when converting kvs to watch events (#11701)
Method `kvsToEvents` can take a long time if a large number of events need to be synchronized. However, this method does not access any shared resources, so it no need to hold the tx lock when executing. So we can move it outside to reduce lock holding time.
2020-03-19 21:01:36 -07:00
Gyuho Lee
72526cef00
Merge pull request #11709 from gyuho/bbolt
vendor: update bbolt v1.3.4, zap v1.14.1
2020-03-19 20:28:00 -07:00
Gyuho Lee
3ffb3aed3a vendor: update bbolt v1.3.4, zap v1.14.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-19 13:36:43 -07:00
Sahdev Zala
45a45d3c0a
Merge pull request #11706 from gyuho/fix-race
clientv3: fix racy writes to context key
2020-03-19 10:34:08 -04:00
Gyuho Lee
b6d98719f6 words: whitelist "racey"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 17:32:42 -07:00
Gyuho Lee
eeb371b7c1 clientv3: fix racy writes to context key
=== RUN   TestWatchOverlapContextCancel

==================

WARNING: DATA RACE

Write at 0x00c42110dd40 by goroutine 99:

  runtime.mapassign()

      /usr/local/go/src/runtime/hashmap.go:485 +0x0

  github.com/coreos/etcd/clientv3.metadataSet()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/ctx.go:61 +0x8c

  github.com/coreos/etcd/clientv3.withVersion()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/ctx.go:47 +0x137

  github.com/coreos/etcd/clientv3.newStreamClientInterceptor.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/client.go:309 +0x81

  google.golang.org/grpc.NewClientStream()

      /go/src/github.com/coreos/etcd/gopath/src/google.golang.org/grpc/stream.go:101 +0x10e

  github.com/coreos/etcd/etcdserver/etcdserverpb.(*watchClient).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go:3193 +0xe9

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).openWatchClient()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:788 +0x143

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).newWatchClient()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:700 +0x5c3

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).run()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:431 +0x12b

Previous read at 0x00c42110dd40 by goroutine 130:

  reflect.maplen()

      /usr/local/go/src/runtime/hashmap.go:1165 +0x0

  reflect.Value.MapKeys()

      /usr/local/go/src/reflect/value.go:1090 +0x43b

  fmt.(*pp).printValue()

      /usr/local/go/src/fmt/print.go:741 +0x1885

  fmt.(*pp).printArg()

      /usr/local/go/src/fmt/print.go:682 +0x1b1

  fmt.(*pp).doPrintf()

      /usr/local/go/src/fmt/print.go:998 +0x1cad

  fmt.Sprintf()

      /usr/local/go/src/fmt/print.go:196 +0x77

  github.com/coreos/etcd/clientv3.streamKeyFromCtx()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:825 +0xc8

  github.com/coreos/etcd/clientv3.(*watcher).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:265 +0x426

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:959 +0x23e

Goroutine 99 (running) created at:

  github.com/coreos/etcd/clientv3.(*watcher).newWatcherGrpcStream()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:236 +0x59d

  github.com/coreos/etcd/clientv3.(*watcher).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:278 +0xbb6

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:959 +0x23e

Goroutine 130 (running) created at:

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:979 +0x76d

  github.com/coreos/etcd/clientv3/integration.TestWatchOverlapContextCancel()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:922 +0x44

  testing.tRunner()

      /usr/local/go/src/testing/testing.go:657 +0x107

==================

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 17:05:05 -07:00
Gyuho Lee
bf883bd15b CHANGELOG*: add new patch releases
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 15:28:05 -07:00
Gyuho Lee
b50c92cb73
Merge pull request #11704 from gyuho/log-health
*: log server-side /health checks
2020-03-18 12:33:13 -07:00
Gyuho Lee
92f180c574 *: log server-side /health checks
To make it easier to root-cause when /health check fails.
For example, we are using load balancer to health check
each etcd instance, and when one etcd node gets terminated,
it's hard to tell whether etcd "server" was really failing
or client (or load balancer") failed to reach the etcd cluster
which is also failure in load balancer health check.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 11:14:05 -07:00
Gyuho Lee
1c16c242db
Merge pull request #11687 from gyuho/embed-client-version
clientv3: fix "hasleader" metadata key, embed client version
2020-03-18 09:16:34 -07:00
Gyuho Lee
33907477dd *: add "etcd_server_client_requests_total", tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
Gyuho Lee
58ba322bb4 clientv3: embed API version
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
Gyuho Lee
5cb1e0b342 clientv3: fix metadata overwrites in "WithRequireLeader"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
Jingyi Hu
07a74d61cb
Merge pull request #11675 from GSokol/master
etcdserver/api/etcdhttp: checkHealth refactoring
2020-03-17 22:43:27 +08:00
Grigorii Sokolik
a33e1b5fae etcdserver/api/etcdhttp: checkHealth refactoring
Small refactoring of
`go.etcd.io/etcd/etcdserver/api/etcdhttp/metrics.go.checkHealth`
function just to avoid anoying repeatings of `if h.Health == "true" {`
2020-03-17 15:37:11 +02:00
Jingyi Hu
c4d8bdc881
Merge pull request #11698 from hexfusion/cl-bump-11694
CHANGELOG: bump to include #11694
2020-03-17 14:07:06 +08:00
Jingyi Hu
31e7b34f71
Merge pull request #11700 from jingyih/correct_changelog_3p4
CHANGELOG-3.4: correction
2020-03-17 04:03:02 +08:00
jingyih
33fb62098b CHANGELOG: correction 2020-03-16 12:18:28 -07:00
Jingyi Hu
193e60ebd9
Merge pull request #11670 from tangcong/optimize-auth-store-log
*: optimize auth/etcdserver logs to facilitate troubleshooting data inconsistency
2020-03-16 00:15:14 +08:00
Sam Batschelet
8e35c0b867 CHANGELOG: bump to include #11694
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-03-15 07:41:41 -04:00