Commit Graph

589 Commits (bc9e433ca26be0314a37c8c6ead66429a584bbc9)

Author SHA1 Message Date
Piotr Tabor f408939aa1 bom: Update bill-of-materials generation logic (and refresh bom). 2020-10-13 07:50:08 +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 bfa91d48af pkg: Estabilish pkg as a module 2020-10-12 23:58:09 +02:00
Piotr Tabor 1983c89e27 pkg/logutil, etcdserver: Move zap-raft logger to etcdserver.
This package depends on raft and is solelly used by etcdserver/raft.go.
So it does not fullfills conditions of:
```
pkg/ is a collection of utility packages used by etcd without being specific to etcd itself. A package belongs here
only if it could possibly be moved out into its own repository in the future.
```
2020-10-12 23:58:09 +02:00
Piotr Tabor 28036db6f0 Mechanical: Move mock packages out of ./pkg
Mechanical execution of:

```
git mv ./pkg/mock/mockserver ./client/pkg/mock
git mv ./pkg/mock/{mockstorage,mockstore,mockwait} ./server/pkg/mock
```

The packages depend on etcd API / protos - so they are NOT etcd-dependencies.
In such situation thay should be placed in 'pkg' folder.
2020-10-12 23:58:09 +02:00
Piotr Tabor c5ccebf792 tests/integration: Simplify the testMain for examples.
We introduce a LazyCluster abstraction (instead of copy-pasted logic)
that makes clusters to be created only if there are runnable tests
in need for the infrastructure.
2020-10-07 15:42:35 +02:00
Piotr Tabor 73b92fe688 tests: Make examples (for not client) to be both: documentation and integration-runnable
This CL tries to connect 2 objectives:
  - Examples should be close (the same package) to the original code,
    such that they can participate in documentation.
  - Examples should be runnable - such that they are not getting out of
    sync with underlying API/implementation.

In case of etcd-client, the examples are assuming running 'integration'
style, i.e. thay do connect to fully functional etcd-server.
That would lead to a cyclic dependencies between modules:
  - server depends on client (as client need to be lightweight)
  - client (for test purposes) depend on server.
Go modules does not allow to distingush testing dependency from
prod-code dependency.

Thus to meet the objective:
  - The examples are getting executed within testing/integration packages against real etcd
  - The examples are symlinked to 'unit' tests, such that they included in documentation.
  - Long-term the unit examples should get rewritten to use 'mocks' instead of real integration tests.
2020-10-07 15:38:40 +02:00
Piotr Tabor be4e8b7013 integration/fixtures: Move the 'tests/integration/fixtures' directory up and update references.
I moved the files up as they are shared between e2e & integrational tests.
2020-10-07 15:38:28 +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 528f5315d6 auth: Fix "race" - auth unit tests leaking goroutines
- We were leaking goroutines in auth-test
  - The go-routines were depending / modifying global test environment
variables (simpleTokenTTLDefault) leading to races

Removed the leaked go-routines, and expanded 'auth' package to
be covered we leaked go-routines detection.
2020-10-03 19:38:30 +02:00
Joe Betz b47cd2f470
Merge pull request #12322 from ptabor/20200920-test-script
./test: Refactoring of test script for modularization
2020-09-29 11:09:24 -04:00
Pierre Zemb cc2b4cd05e
etcdserver: add more detailed traces on linearized reading (#12335)
To improve debuggability of `agreement among raft nodes before
linearized reading`, we added some tracing inside
`linearizableReadLoop`.

This will allow us to know the timing of `s.r.ReadIndex` vs
`s.applyWait.Wait(rs.Index)`.
2020-09-26 19:08:36 -07:00
Piotr Tabor 16eeedffaa pkg/testutil: Fixing flakes due to >>leak" text/template/parse goroutines.
Examplar flake: https://travis-ci.com/github/etcd-io/etcd/jobs/388806782
```
go test -timeout=5m -cpu=1 --run=Example ./client/...

ok  	go.etcd.io/etcd/v3/client	0.085s
testing: warning: no tests to run
PASS
Unexpected goroutines running after all test(s).
1 instances of:
text/template/parse.(*lexer).emit(...)
	/usr/local/go/src/text/template/parse/lex.go:157
text/template/parse.lexText(...)
	/usr/local/go/src/text/template/parse/lex.go:269 +0x4f0
text/template/parse.(*lexer).run(...)
	/usr/local/go/src/text/template/parse/lex.go:230 +0x37
created by text/template/parse.lex
	/usr/local/go/src/text/template/parse/lex.go:223 +0x190
FAIL	go.etcd.io/etcd/v3/client/integration	0.013s
```
2020-09-25 22:10:43 +02:00
mlmhl 3f36143790
pkg/traceutil: skip subTraceStart/subTraceEnd steps when logging steps (#12262)
SubTraceStart and SubTraceEnd steps are only placeholders, not really
steps, we should skip them when logging the long duration steps,
otherwise these steps will lead to incorrect start time and duration
 of subsequent steps.
2020-09-25 11:46:06 -07:00
Tobias Klauser add86bbd1a
pkg/fileutil: use fcntl syscall wrappers from golang.org/x/sys/unix (#12316)
Direct syscalls using syscall.Syscall(SYS_*, ...) should no longer be
used on darwin, see [1]. Instead, use the fcntl libSystem wrappers
provided by the golang.org/x/sys/unix package which implement the same
functionality.

[1] https://golang.org/doc/go1.12#darwin
2020-09-24 23:02:32 -07:00
Piotr Tabor 04b91945f4 pkg/testutil: Ignore flakes due to "leaked" testing.runTests goroutine.
The flake happened e.g. in:
https://travis-ci.com/github/etcd-io/etcd/jobs/386607570

```
--- PASS: TestWatchClose (0.37s)
PASS
Unexpected goroutines running after all test(s).
1 instances of:
testing.runTests.func1.1(...)
	/usr/local/go/src/testing/testing.go:1289 +0x60
created by testing.runTests.func1
	/usr/local/go/src/testing/testing.go:1289 +0xdb
FAIL	go.etcd.io/etcd/v3/clientv3/integration	344.389s
FAIL
```

This is implementation detail of Go testing.lib and we should not worry.
2020-09-19 17:16:21 +02:00
Piotr Tabor 3f449a8548 *: 'go test --short ./...' runs all UNIT tests.
Marked all 'integrational, e2e' as skipped in the --short mode.

Thanks to this we will be able to significantly simplify ./test script.

The run currently takes ~23s.
With (follow up) move of ~clientv3/snapshot to integration tests (as
part of modularization), we can expect this to fall to 5-10s.

```
% time go test --short ./... --count=1
ok  	go.etcd.io/etcd/v3	0.098s
?   	go.etcd.io/etcd/v3/Documentation/learning/lock/client	[no test files]
?   	go.etcd.io/etcd/v3/Documentation/learning/lock/storage	[no test files]
ok  	go.etcd.io/etcd/v3/auth	0.724s
?   	go.etcd.io/etcd/v3/auth/authpb	[no test files]
ok  	go.etcd.io/etcd/v3/client	0.166s
ok  	go.etcd.io/etcd/v3/client/integration	0.166s
ok  	go.etcd.io/etcd/v3/clientv3	3.219s
ok  	go.etcd.io/etcd/v3/clientv3/balancer	1.102s
?   	go.etcd.io/etcd/v3/clientv3/balancer/connectivity	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/balancer/picker	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/clientv3util	0.096s [no tests to run]
ok  	go.etcd.io/etcd/v3/clientv3/concurrency	3.323s
?   	go.etcd.io/etcd/v3/clientv3/credentials	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/integration	0.131s
?   	go.etcd.io/etcd/v3/clientv3/leasing	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/mirror	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/namespace	0.041s
ok  	go.etcd.io/etcd/v3/clientv3/naming	0.115s
ok  	go.etcd.io/etcd/v3/clientv3/ordering	0.121s
ok  	go.etcd.io/etcd/v3/clientv3/snapshot	19.325s
ok  	go.etcd.io/etcd/v3/clientv3/yaml	0.090s
ok  	go.etcd.io/etcd/v3/contrib/raftexample	7.572s
?   	go.etcd.io/etcd/v3/contrib/recipes	[no test files]
ok  	go.etcd.io/etcd/v3/embed	0.282s
ok  	go.etcd.io/etcd/v3/etcdctl	0.054s
?   	go.etcd.io/etcd/v3/etcdctl/ctlv2	[no test files]
ok  	go.etcd.io/etcd/v3/etcdctl/ctlv2/command	0.117s
?   	go.etcd.io/etcd/v3/etcdctl/ctlv3	[no test files]
ok  	go.etcd.io/etcd/v3/etcdctl/ctlv3/command	0.070s
ok  	go.etcd.io/etcd/v3/etcdmain	0.172s
ok  	go.etcd.io/etcd/v3/etcdserver	1.698s
?   	go.etcd.io/etcd/v3/etcdserver/api	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/etcdhttp	0.075s
ok  	go.etcd.io/etcd/v3/etcdserver/api/membership	0.104s
?   	go.etcd.io/etcd/v3/etcdserver/api/membership/membershippb	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/rafthttp	0.181s
ok  	go.etcd.io/etcd/v3/etcdserver/api/snap	0.078s
?   	go.etcd.io/etcd/v3/etcdserver/api/snap/snappb	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2auth	0.142s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2discovery	0.035s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2error	0.043s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2http	0.070s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2http/httptypes	0.031s
?   	go.etcd.io/etcd/v3/etcdserver/api/v2stats	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2store	0.645s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2v3	0.218s
?   	go.etcd.io/etcd/v3/etcdserver/api/v3alarm	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3client	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3compactor	1.765s
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb/gw	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb/gw	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3rpc	0.091s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes	0.012s
ok  	go.etcd.io/etcd/v3/etcdserver/cindex	0.054s
ok  	go.etcd.io/etcd/v3/etcdserver/etcdserverpb	0.039s
?   	go.etcd.io/etcd/v3/etcdserver/etcdserverpb/gw	[no test files]
ok  	go.etcd.io/etcd/v3/functional/agent	0.094s
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-agent	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-proxy	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-runner	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-tester	[no test files]
ok  	go.etcd.io/etcd/v3/functional/rpcpb	0.060s
?   	go.etcd.io/etcd/v3/functional/runner	[no test files]
ok  	go.etcd.io/etcd/v3/functional/tester	0.079s
ok  	go.etcd.io/etcd/v3/integration	0.684s
ok  	go.etcd.io/etcd/v3/integration/embed	0.101s
ok  	go.etcd.io/etcd/v3/lease	3.455s
ok  	go.etcd.io/etcd/v3/lease/leasehttp	2.185s
?   	go.etcd.io/etcd/v3/lease/leasepb	[no test files]
ok  	go.etcd.io/etcd/v3/mvcc	7.246s
ok  	go.etcd.io/etcd/v3/mvcc/backend	0.354s
?   	go.etcd.io/etcd/v3/mvcc/mvccpb	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/adt	0.025s
?   	go.etcd.io/etcd/v3/pkg/contention	[no test files]
?   	go.etcd.io/etcd/v3/pkg/cpuutil	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/crc	0.008s
?   	go.etcd.io/etcd/v3/pkg/debugutil	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/expect	0.015s
ok  	go.etcd.io/etcd/v3/pkg/fileutil	0.268s
ok  	go.etcd.io/etcd/v3/pkg/flags	0.021s
ok  	go.etcd.io/etcd/v3/pkg/httputil	0.020s
ok  	go.etcd.io/etcd/v3/pkg/idutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/ioutil	0.025s
ok  	go.etcd.io/etcd/v3/pkg/logutil	0.047s
?   	go.etcd.io/etcd/v3/pkg/mock/mockserver	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockstorage	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockstore	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockwait	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/netutil	1.024s
ok  	go.etcd.io/etcd/v3/pkg/osutil	0.021s
ok  	go.etcd.io/etcd/v3/pkg/pathutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/pbutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/proxy	4.081s
ok  	go.etcd.io/etcd/v3/pkg/report	0.008s
?   	go.etcd.io/etcd/v3/pkg/runtime	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/schedule	0.009s
ok  	go.etcd.io/etcd/v3/pkg/srv	0.019s
ok  	go.etcd.io/etcd/v3/pkg/stringutil	0.008s
?   	go.etcd.io/etcd/v3/pkg/systemd	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/testutil	0.023s
ok  	go.etcd.io/etcd/v3/pkg/tlsutil	3.965s
ok  	go.etcd.io/etcd/v3/pkg/traceutil	0.034s
ok  	go.etcd.io/etcd/v3/pkg/transport	0.532s
ok  	go.etcd.io/etcd/v3/pkg/types	0.028s
ok  	go.etcd.io/etcd/v3/pkg/wait	0.023s
ok  	go.etcd.io/etcd/v3/proxy/grpcproxy	0.101s
?   	go.etcd.io/etcd/v3/proxy/grpcproxy/adapter	[no test files]
?   	go.etcd.io/etcd/v3/proxy/grpcproxy/cache	[no test files]
ok  	go.etcd.io/etcd/v3/proxy/httpproxy	0.044s
ok  	go.etcd.io/etcd/v3/proxy/tcpproxy	0.047s
ok  	go.etcd.io/etcd/v3/raft	0.312s
ok  	go.etcd.io/etcd/v3/raft/confchange	0.183s
ok  	go.etcd.io/etcd/v3/raft/quorum	0.316s
ok  	go.etcd.io/etcd/v3/raft/raftpb	0.024s
ok  	go.etcd.io/etcd/v3/raft/rafttest	0.640s
ok  	go.etcd.io/etcd/v3/raft/tracker	0.026s
ok  	go.etcd.io/etcd/v3/tests/e2e	0.077s
?   	go.etcd.io/etcd/v3/tools/benchmark	[no test files]
?   	go.etcd.io/etcd/v3/tools/benchmark/cmd	[no test files]
?   	go.etcd.io/etcd/v3/tools/etcd-dump-db	[no test files]
ok  	go.etcd.io/etcd/v3/tools/etcd-dump-logs	0.088s
?   	go.etcd.io/etcd/v3/tools/etcd-dump-metrics	[no test files]
?   	go.etcd.io/etcd/v3/tools/local-tester/bridge	[no test files]
?   	go.etcd.io/etcd/v3/version	[no test files]
ok  	go.etcd.io/etcd/v3/wal	1.517s
?   	go.etcd.io/etcd/v3/wal/walpb	[no test files]
go test --short ./... --count=1  76.12s user 12.57s system 375% cpu 23.635 total
```
2020-09-16 13:21:46 +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
Piotr Tabor 2d0ce9de3d etcdmain: grpc-proxy should only require CN-less certificates for --cert flags.
We have following communication schema:
client --- 1 ---> grpc-proxy --- 2 --- > etcd-server

There are 2 sets of flags/certs in grpc proxy [ https://github.com/etcd-io/etcd/blob/master/etcdmain/grpc_proxy.go#L140 ]:
 A. (cert-file, key-file, trusted-ca-file, auto-tls) this are controlling [1] so client to proxy connection and in particular they are describing proxy public identity.
 B. (cert,key, cacert ) - these are controlling [2] so what's the identity that proxy uses to make connections to the etcd-server.

If 2 (B.) contains certificate with CN and etcd-server is running with --client-cert-auth=true, the CN can be used as identity of 'client' from service perspective. This is permission escalation, that we should forbid.

If 1 (A.) contains certificate with CN - it should be considered perfectly valid. The server can (should) have full identity.

So only --cert flag (and not --cert-file flag) should be validated for empty CN.
2020-09-07 11:59:28 +02:00
Sahdev Zala ae66916226
pkg: file stat warning (#12242)
Provide warning and doc instead of enforcing file permission.
2020-08-23 17:20:16 -07:00
Mario Valderrama be70400fb5 etcdserver: Use Readdirnames to count fds for FDUsage
Readdir already calls Readdirnames, but continues to allocate
os.FileInfo with Lstat for each result.
2020-08-20 16:51:29 +02:00
Gyuho Lee 53fdcdc5a2 pkg/runtime: optimize FDUsage by removing sort
No need sort when we just want the counts.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 10:32:24 -07:00
Gyuho Lee 18adf55c92
Merge pull request #12199 from ptabor/20200803-expect-replace-fix
tests/e2e: Update github.com/creack/pty v1.1.7 -> v1.1.11
2020-08-11 11:59:12 -07:00
Piotr Tabor 830618e44d ./integration: Fix flakes due to .setupLogging race.
The source of problem was the fact that multiple tests were creating
their clusters (and some of them were setting global grpclog).
If the test was running after some other test that created HttpServer
(so accessed grpclog), this was reported as race.

Tested with:
  go test ./clientv3/. -v "--run=(Example).*" --count=2
  go test ./clientv3/. -v "--run=(Test).*" --count=2
  go test ./integration/embed/. -v "--run=(Test).*" --count=2
2020-08-07 13:54:41 +02:00
Piotr Tabor b151a47d1b tests/e2e: Update github.com/creack/pty v1.1.7 -> v1.1.11
The fix is needed to mitigate consequences of
https://github.com/golang/go/issues/29458 "golang breaking change" that
causes following test failures on etcd end:

--- FAIL: TestCtlV2Set (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
--- FAIL: TestCtlV2SetQuorum (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
--- FAIL: TestCtlV2SetClientTLS (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
2020-08-04 16:12:12 +02:00
Manohar Reddy bc67babee8
package adt: rename the filename to be consistent with the package name (#12170) 2020-07-28 14:40:34 -07:00
Sahdev P. Zala f5a85e9987 pkg: consider umask when use MkdirAll
os.MkdirAll creates directory before umask so make sure that a desired
permission is set after creating a directory with MkdirAll. Use the
existing TouchDirAll function which checks for permission if dir is already
exist and when create a new dir.
2020-06-20 13:10:11 -04:00
tangcong 50d7a10a3f pkg/fileutil: print desired file permission in error log 2020-06-10 22:45:36 +08:00
Changxin Miao e06006ea28 pkg: Fix dir permission check on Windows 2020-05-26 11:15:25 +08:00
Viacheslav Biriukov 50517039ae
etcdserver/*, wal/*: add Sync method 2020-05-13 08:47:47 -07:00
Viacheslav Biriukov 5435e7686a
etcdserver/*: fix tests 2020-05-13 08:47:41 -07:00
Gyuho Lee b34c0c55a5 pkg/tlsutil: add "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" to support cipher suite
pkg/tlsutil: support TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 18:36:28 -07:00
Brandon Philips d88d765ba4 Documentation, CHANGELOG: use new go.etcd.io/etcd/v3 pkg
Use the new package path in the docs and announce it in the CHANGELOG
2020-04-28 22:02:19 +00:00
Brandon Philips dd21e710e1 testutil: leak: fix path for go routine filter
add go.etcd.io/etcd/v3 to existing filters
2020-04-28 00:57:52 +00:00
Brandon Philips 96cce208c2 go.mod: use go.etcd.io/etcd/v3 versioning
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.

Used this tool to update package imports:
  https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
Sahdev Zala b40f18b506
pkg: check file stats (#11798)
modify file util.
2020-04-21 19:58:48 -07:00
Yuchen Zhou c623f798cb
etcdserver: add trace for txn request (#11491)
* etcdserver: add trace for txn request

* pkg/traceutil: added StopSubTrace as a sign of the end of subtrace. Added test case for logging out subtrace.
2020-04-04 14:46:03 -07:00
zhanwang 2092b5b1a9
pkg, clientv3: etcdctl snaprestore when data-dir empty (#11648) 2020-04-04 14:41:19 -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
Tobias Grieger 8756286fe8
Merge pull request #11568 from lzhfromustc/GL_test_7_bugs
transport: simple fix in test functions to prevent goroutine leak
2020-02-20 16:54:42 +01:00
Ziheng Liu b340dfdcbb transport: simple fix in test functions to prevent goroutine leak 2020-02-12 18:32:03 -05:00
jingyih 09304a4d82 vendor: remove capnslog
Clean up capnslog from etcd code base. Remove its dependency.
2020-02-12 12:33:16 -08:00
Jingyi Hu ae983523db
pkg: remove capnslog (#11616)
* pkg: remove capnslog

* CHANGELOG: function signature change
2020-02-12 11:15:41 -08:00
sfzhu93 467e08c32a
in multiple packages: fixed goroutine leak bugs in tests (cont.d) (#11570) 2020-01-30 10:55:59 -08:00
cuiyuan 98f62d27be pkg/adt: rbcolor string fix 2019-12-30 19:52:34 +08:00
poslua fd2dddb39f vendor: bump go-systemd to v22.0.0 to fix mod tidy error (#11387) 2019-12-04 18:47:14 -08:00
Jingyi Hu c447955d93 etcdserver: wait purge file loop during shutdown
To prevent the purge file loop from accidentally acquiring the file lock
and remove the files during server shutdowm.
2019-10-30 14:21:08 -07:00
ZYunH 279fee668b fileutil, src: format errors 2019-10-25 22:31:49 +08:00
yoyinzyc 57aa68af5a etcdserver: trace compaction request; add return parameter 'trace' to applierV3.Compaction()
mvcc: trace compaction request; add input parameter 'trace' to KV.Compact()
2019-10-07 09:55:27 -07:00
yoyinzyc 3a3eb24c69 etcdserver: trace raft requests. 2019-10-01 15:38:52 -07:00