Piotr Tabor
e33c6dd9df
client/v3: Rename of imports
2020-10-20 10:13:06 +02:00
Piotr Tabor
e62417297d
*: Rename of imports of raft (as its now a module)
...
% find -name '*.go' -o -name '*.md' -o -name '*.sh' | xargs sed -i --follow-symlinks 's|etcd/v3/raft|etcd/raft/v3|g'
2020-10-16 13:58:18 +02:00
Piotr Tabor
45e4306508
client: Move client to client/v2 as a module.
...
We make v2 client code a module go.etcd.io/etcd/client/v2.
Pretty mechanical change that can be summarized as:
mkdir client/v2
cd client/v2 && git mod init go.etcd.io/etcd/client/v2
git mv client/*.go client/v2/
find -name '*.go' | xargs sed -i --follow-symlinks 's|/v3/client["]|/client/v2\"|g'
+ fixing changelog, bom, go.mod etc.
2020-10-15 14:39:43 +02:00
Piotr Tabor
cc7b4fab9f
*: Execution of ./scripts/genproto.sh after versions change
2020-10-14 18:46:38 +02:00
Piotr Tabor
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
Piotr Tabor
5ba46f625f
pkg/mock: Update imports to point on new files locations.
...
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock/mockserver|go.etcd.io/etcd/v3/client/mock/mockserver|g'
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock|go.etcd.io/etcd/v3/server/mock|g'
go fmt ./...
2020-10-12 23:58:09 +02:00
Piotr Tabor
3153038ffb
tests/integration: Moving integration tests to tests/integration directory
...
git mv integration ./tests
git mv client/integration/* ./tests/integration/client
git mv clientv3/integration/* ./tests/integration/clientv3
git mv client/example_keys_test.go client/main_test.go tests/integration/client/examples
git mv clientv3/concurrency/*_test.go tests/integration/clientv3/concurrency
git mv etcdserver/api/v2store/store_v2v3_test.go etcdserver/api/v2v3/*_test.go tests/integration/v2store
git mv tests/integration/v2store/store_v2v3_test.go tests/integration/v2store/store_v2v3.go
git mv tests/integration/v2store/store_test.go tests/integration/v2store/store_v2v3_test.go
git mv etcdserver/api/v2store/store_test.go tests/integration/v2store
git mv etcdserver/api/v2store/store_v2_test.go tests/integration/v2store
git mv proxy/grpcproxy/*_test.go tests/integration/proxy/grpcproxy
git mv ./clientv3/snapshot/testdata ./clientv3/snapshot/*_test.go ./tests/integration/snapshot
2020-10-07 15:36:21 +02:00
Piotr Tabor
ec3026fdc9
*: Run ./scripts/genproto.sh (protoc 3.12.3) after proto file moves.
...
The changed blobs are consequences of proto-descriptors changing as a
result of file moves.
2020-10-06 11:57:19 +02:00
Piotr Tabor
28f2b07623
*: Update references to code moved to the api/ dir.
...
Follow up to file-moves done in the previous commit.
The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'
I also modified manually paths in scripts/genproto.sh.
% go fmt ./...
2020-10-06 11:56:16 +02:00
Piotr Tabor
389642dd16
client: Move client specific code (protos, version) to api/
...
client: Move client specific code (protos, version) to the api/
directory. Thanks to this change /client directory will not need to depend on
the server code. In next commits we make "/api" a module on its own.
Mechanical consequences of execution:
% git mv version/version.go api/version
% git mv etcdserver/api/v3rpc/rpctypes api/v3rpc
% git mv mvcc/mvccpb api/
% git mv etcdserver/etcdserverpb api/
% git mv auth/authpb api/
% git mv etcdserver/api/membership/membershippb api/
2020-10-06 11:53:36 +02:00
Piotr Tabor
220f711a2a
clientv3/integration: Fix leaked goroutine in case of skipped test.
2020-10-03 19:38:54 +02:00
Jingyi Hu
528b01c327
Merge pull request #12303 from ptabor/20200915-v3compactor-metric-reporting
...
etcdserver: v3compactor should use proper clock for latency (took) reporting
2020-09-17 02:26:56 -07:00
Piotr Tabor
2048c80760
etcdserver: v3compactor should use proper clock for latency (took) reporting.
...
The code used to:
- report time since previous compaction success as a 'duration' of compaction process itself.
- mix real clock with 'injected' clock. This led to strange log-lines
in tests in order of 234543543h of duration.
2020-09-15 16:43:05 +02:00
Piotr Tabor
0a106754d3
etcdserver: Speed-up v3compactor unit tests.
...
The tests were taking ~15s because of 5s wait time in Recorder !?
2020-09-15 12:00:46 +02:00
jingyih
9a698476bf
*: add experimental flag for watch notify interval
2020-08-14 12:01:00 -07:00
Gyuho Lee
7eac6bd497
*: upgrade zap logger to 1.15, replace global logger
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 09:50:00 -07:00
Gyuho Lee
ed27d9d2de
Merge pull request #12198 from ptabor/20200803-int-to-string-test-fix
...
etcdserver, wal: Fix tests unintended CASTing of int->String.
2020-08-11 21:35:20 -07:00
Gyuho Lee
fe36be2251
Merge pull request #12195 from tangcong/optimize-healthcheck
...
*: check health by using v3 range request and its corresponding timeout
2020-08-11 21:32:44 -07:00
Piotr Tabor
00de56a4a4
etcdserver, wal: Fix tests that were performing unintended casting of int to String.
...
Fixes following problems during "./etcd# go test ./..."
> go.etcd.io/etcd/v3/etcdserver/api/v2store_test
etcdserver/api/v2store/store_test.go:847:24: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
> go.etcd.io/etcd/v3/wal
wal/wal_test.go:242:68: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
2020-08-04 20:28:41 +02:00
tangcong
25220a0287
*: check health by using v3 range request and its corresponding timeout
2020-08-04 00:34:18 +08:00
nicktming
6c81b20ec8
rafthttp: fix streamHandle outgoingConn peerID ( #12179 )
2020-07-28 14:41:10 -07:00
Denis Issoupov
51de68ddac
12126: snapshot: corrupted in Embedded server ( #12129 )
2020-07-26 11:14:46 -07:00
Jan Kuri
7f27697df9
v3client: implement clientv3.Auth interface ( #12140 )
2020-07-20 16:53:25 -07:00
Denis Issoupov
701f02f90a
12125: panic: zap.Logger is nil in Embed client
2020-07-13 09:08:20 -07:00
tangcong
0898c5b978
*: add health check for grpcproxy self
2020-07-10 20:17:44 +08:00
Gyuho Lee
27ddb84268
Merge pull request #12107 from tangcong/register-grpcproxy-metrics
...
*: register metrics handler for grpcproxy self
2020-07-06 13:00:35 -07:00
tangcong
fff5d3cc03
*: register metrics handler for grpcproxy self
2020-07-02 22:55:18 +08:00
tangcong
644d09edb5
v3rpc: print expensive request info in UnaryInterceptor
2020-07-01 00:54:23 +08:00
yoyinzyc
2541b0bba9
etcdserver: apply downgrade policy to server.
2020-06-24 11:06:29 -07:00
tangcong
4acaa5a2a0
etcdserver/api/etcdhttp: add reason field for /health response
2020-06-10 11:14:56 +08:00
CFC4N
3082a7d521
etcdserver/api/v2store: fix race in TestIssue2746WithThree ( #11982 )
2020-06-09 19:11:08 -07:00
Gyuho Lee
62f1fefe4a
Merge pull request #11959 from tedyu/store-clone-rd-lock
...
etcdserver: take read lock when cloning store
2020-06-03 14:13:53 -07:00
Gyuho Lee
a09533d63d
Merge pull request #11960 from tedyu/internal-create-err-chk
...
etcdserver: check error return for store#internalCreate
2020-06-03 14:13:19 -07:00
Gyuho Lee
be0639090d
Merge pull request #11939 from tedyu/chk-ret-from-write
...
etcdserver: check the error return from Write()
2020-06-03 14:12:50 -07:00
Ted Yu
5c95114190
etcdserver: check the error return from Write()
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:27:01 -07:00
Ted Yu
17483944fc
etcdserver: check error return for store#internalCreate
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:20:05 -07:00
Ted Yu
59ec251812
etcdserver: take read lock when cloning store
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:08:26 -07:00
Ted Yu
df57a68b47
Check events against nil
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-22 13:35:25 -07:00
Gyuho Lee
cac53867ac
rafthttp: log snapshot download
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-20 10:55:43 -07:00
Gyuho Lee
1fd1318409
etcdserver/api/rafthttp: improve snapshot send logging
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-18 02:29:20 -07:00
Gyuho Lee
5e2815e9cd
Merge pull request #11801 from YoyinZyc/downgrade-server
...
[Etcd downgrade] Implement downgrade validate, enable and cancel
2020-05-17 22:47:16 -07:00
Ted Yu
f35015abc5
etcdserver: snapNames() should exclude orphaned defragmentation file
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-17 14:19:33 -07:00
Gyuho Lee
8b50f4e11d
Merge pull request #11899 from tedyu/rel-snap-db
...
etcdserver: continue releasing snap db in case of error
2020-05-17 14:01:33 -07:00
Ted Yu
b84d257b92
etcdserver: continue releasing snap db in case of error
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-16 04:43:55 -07:00
yoyinzyc
37e598a20b
etcdserver: define error string and link with grpc error code.
2020-05-15 11:51:39 -07:00
Gyuho Lee
4ddcc36057
etcdserver/api/v3rpc: document, clean up snapshot sends
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:52 -07:00
Gyuho Lee
f1179fd70d
etcdserver/api/snap: update format string in "ReleaseSnapDBs"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:20 -07:00
Joe Betz
743e6e92cb
etcdserver/*, wal/*: Remove orphaned .snap.db files during Release
2020-05-14 15:16:51 -07:00
Joe Betz
bd16071846
etcdserver/*, wal/*: find valid snapshots by cross checking snap files and wal snap entries
2020-05-14 09:22:45 -07:00
Viacheslav Biriukov
9162cd613d
etcdserver/*, wal/*: changes to snapshots and wal logic to fix #10219
2020-05-13 08:42:03 -07:00