Commit Graph

19418 Commits (9a2553fe2f3d9a851b591f4ac871368b7cef689b)

Author SHA1 Message Date
Chao Chen 9a2553fe2f migrate auth tests to common #7
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-27 19:30:41 -07:00
Benjamin Wang 8b93e0e46b
Merge pull request #15559 from mitake/changelog-15542
changelog: added item to cover reverting 14548 in release-3.4
2023-03-27 12:30:10 +08:00
Hitoshi Mitake cd240a9a29 changelog: added item to cover reverting 14548 in release-3.4
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-03-26 18:21:01 +09:00
Benjamin Wang 96389040d7
Merge pull request #15554 from etcd-io/dependabot/github_actions/actions/checkout-3.5.0
build(deps): bump actions/checkout from 3.4.0 to 3.5.0
2023-03-25 07:17:46 +08:00
dependabot[bot] 5f6dab4149
build(deps): bump actions/checkout from 3.4.0 to 3.5.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8f4b7f8486)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 10:36:27 +00:00
Marek Siarkowicz fdcc292b94
Merge pull request #15505 from pchan/add_test_image_2
scripts: Add testing of etcd in local image in release workflow.
2023-03-24 11:35:49 +01:00
Prasad Chandrasekaran 14fbc98b20 Make version check independent from put/get checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:29:34 +05:30
Prasad Chandrasekaran 0a94133089 Use run --rm for version checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:27:06 +05:30
Prasad Chandrasekaran ab2a1b7ad6 Incorporate review comments
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 14:32:23 +05:30
Prasad Chandrasekaran d5e5f1b542 scripts: Add testing of etcd in local image in release workflow.
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 13:33:48 +05:30
Marek Siarkowicz e522ce02b8
Merge pull request #15552 from serathius/postmortem-update
Update status of postmortem action items
2023-03-23 11:55:58 +01:00
Marek Siarkowicz 00c789f5bc docs: Update status of postmortem action items
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-23 11:30:55 +01:00
Benjamin Wang ead6c43650
Merge pull request #15551 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.8
build(deps): bump github/codeql-action from 2.2.7 to 2.2.8
2023-03-23 07:18:37 +08:00
dependabot[bot] 2d491356ec
build(deps): bump github/codeql-action from 2.2.7 to 2.2.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](168b99b3c2...67a35a0858)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 22:28:33 +00:00
Benjamin Wang 08471cddfd
Merge pull request #15519 from fuweid/remove-tee-in-ci
chore: introduce strict bash mode for scripts,.github
2023-03-23 06:28:02 +08:00
Wei Fu 1fcb782780 chore: introduce strict bash mode for scripts,.github
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 18:00:41 +08:00
Benjamin Wang 6b9c1462fd
Merge pull request #15291 from ggustafsson/main
etcd-mixin: Limit etcdDatabaseHighFragmentationRatio to 100MB+
2023-03-22 17:12:33 +08:00
Benjamin Wang 86fd5d6b99
Merge pull request #15546 from fuweid/update-changelog
CHANGELOG: add 'server/embed: fix data race when starting both secure & insecure gRPC servers on the same address' into 3.4/3.5
2023-03-22 15:21:27 +08:00
Wei Fu 0daf06fa83 CHANGELOG: add item into 3.4/3.5
Add item [server/embed: fix data race when starting both secure & insecure
gRPC servers on the same address] to 3.4/3.5 changelog.

REF: #15509

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 14:03:47 +08:00
Benjamin Wang c62cf2cb9f
Merge pull request #15538 from ahrtr/dependency_20230321
Bump some dependencies
2023-03-21 16:30:36 +08:00
Benjamin Wang f43dccb2f3
Merge pull request #15536 from etcd-io/dependabot/github_actions/actions/setup-go-4.0.0
build(deps): bump actions/setup-go from 3.5.0 to 4.0.0
2023-03-21 09:35:07 +08:00
Benjamin Wang 8c4bbcc8c7 dependency: bump golang.org/x/ to 0.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 08:36:39 +08:00
Benjamin Wang 1b2b89e378 dependency: bump github.com/mgechev/revive to 1.3.1 and honnef.co/go/tools to 0.4.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 08:36:39 +08:00
dependabot[bot] 64319cf9b7
build(deps): bump actions/setup-go from 3.5.0 to 4.0.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.5.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](6edd4406fa...4d34df0c23)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 00:33:10 +00:00
Benjamin Wang 9d8292256b
Merge pull request #15534 from etcd-io/dependabot/github_actions/actions/checkout-3.4.0
build(deps): bump actions/checkout from 3.3.0 to 3.4.0
2023-03-21 08:32:24 +08:00
Benjamin Wang 10196c55a7
Merge pull request #15535 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.7
build(deps): bump github/codeql-action from 2.2.6 to 2.2.7
2023-03-21 08:29:55 +08:00
Benjamin Wang b7f8fb1cc5
Merge pull request #15521 from serathius/cov-main
Point coverage to correct branch
2023-03-21 06:42:31 +08:00
dependabot[bot] 586d053d84
build(deps): bump github/codeql-action from 2.2.6 to 2.2.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.6 to 2.2.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](16964e90ba...168b99b3c2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 18:06:24 +00:00
dependabot[bot] dd6fa9fd10
build(deps): bump actions/checkout from 3.3.0 to 3.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...24cb908017)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 18:06:19 +00:00
Marek Siarkowicz 561c94019f Point coverage to correct branch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 16:26:02 +01:00
Marek Siarkowicz 6d01ab641f
Merge pull request #15492 from serathius/fix-issue15271
Fix 15271
2023-03-20 12:01:45 +01:00
Marek Siarkowicz 3e5fc2e4fc tests: Enable BlackholeUntilSnapshot robustness scenario
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:15:42 +01:00
Marek Siarkowicz 7052d8998a server: Test watch restore
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:15:41 +01:00
Bogdan Kanivets a690707c57 mvcc: update minRev when watcher stays synced
Problem: during restore in watchableStore.Restore, synced watchers are moved to unsynced.
minRev will be behind since it's not updated when watcher stays synced.

Solution: update minRev

fixes: https://github.com/etcd-io/etcd/issues/15271
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:11:48 +01:00
Marek Siarkowicz 8cb8f4bf1c
Merge pull request #15489 from fuweid/fix-data-race-in-ut
deflake: mvcc storage ut
2023-03-20 10:23:02 +01:00
Marek Siarkowicz 30abf17f92
Merge pull request #15509 from fuweid/fix-15495
server/embed: fix data race when start insecure grpc
2023-03-19 19:37:12 +01:00
Wei Fu eb09e00541 chore: refactor cleanup fn in mvcc test
The tmp path is cleanup by go testing so that the `cleanup` doesn't need
to call `os.Remove`.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-19 21:46:03 +08:00
Benjamin Wang 946918e4a1
Merge pull request #15494 from jmhbnz/txn_help_docs
Add detailed long description for etcdctl txn
2023-03-19 06:42:12 +08:00
Wei Fu a9988e2625 server/embed: fix data race when start insecure grpc
There are two goroutines accessing the `gs` grpc server var. Before
insecure `gs` server start, the `gs` can be changed to secure server and
then the client will fail to connect to etcd with insecure request. It
is data-race. We should use argument for reference in the new goroutine.

fix: #15495

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 21:48:58 +08:00
Marek Siarkowicz 736c89398b
Merge pull request #15500 from chaochn47/document_measure_test_flakiness
document measure-test-flakiness.sh
2023-03-18 10:45:44 +01:00
Wei Fu 830d9e9eaa test: fix TestRestoreContinueUnfinishedCompaction
The original testcase uses `return` statement which skips `restore`
case. It's aimed to enable `restore` testcase.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 10:58:05 +08:00
Wei Fu d200f72d2d test: should not leak goroutines after test finished
The original flaky test shows in CI pipeline[1], but gotestsum run into
a golang issue[2]. The error message is not clear from summary, like

```
{"Time":"2023-03-02T09:19:38.754394861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1433 +0x7e4\n"}
{"Time":"2023-03-02T09:19:38.754414561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/runtime/panic.go:476 +0x32\n"}
{"Time":"2023-03-02T09:19:38.754430561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x47\n"}
{"Time":"2023-03-02T09:19:38.754482561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:883 +0xc4\n"}
{"Time":"2023-03-02T09:19:38.754497661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:876 +0xa4\n"}
{"Time":"2023-03-02T09:19:38.754512161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:927 +0x6a\n"}
{"Time":"2023-03-02T09:19:38.754567661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zaptest.testingWriter.Write()\n"}
{"Time":"2023-03-02T09:19:38.754571261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zaptest/logger.go:130 +0x12c\n"}
{"Time":"2023-03-02T09:19:38.754582861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zaptest.(*testingWriter).Write()\n"}
{"Time":"2023-03-02T09:19:38.754597761Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zapcore.(*ioCore).Write()\n"}
{"Time":"2023-03-02T09:19:38.754600961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/core.go:99 +0x199\n"}
{"Time":"2023-03-02T09:19:38.754612761Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zapcore.(*CheckedEntry).Write()\n"}
{"Time":"2023-03-02T09:19:38.754618561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/entry.go:255 +0x2ce\n"}
{"Time":"2023-03-02T09:19:38.754630161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap.(*Logger).Info()\n"}
{"Time":"2023-03-02T09:19:38.754633261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/logger.go:220 +0x6a\n"}
{"Time":"2023-03-02T09:19:38.754644861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Compact()\n"}
{"Time":"2023-03-02T09:19:38.754648461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/index.go:194 +0x144\n"}
{"Time":"2023-03-02T09:19:38.754664961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).scheduleCompaction()\n"}
{"Time":"2023-03-02T09:19:38.754670161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore_compaction.go:29 +0xbb\n"}
{"Time":"2023-03-02T09:19:38.754681861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).compact.func1()\n"}
{"Time":"2023-03-02T09:19:38.754690561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore.go:235 +0x9e\n"}
{"Time":"2023-03-02T09:19:38.754720061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.job.Do()\n"}
{"Time":"2023-03-02T09:19:38.754724161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:41 +0x70\n"}
{"Time":"2023-03-02T09:19:38.754736161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*job).Do()\n"}
{"Time":"2023-03-02T09:19:38.754750961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob()\n"}
{"Time":"2023-03-02T09:19:38.754754161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:206 +0x101\n"}
{"Time":"2023-03-02T09:19:38.754765861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).run()\n"}
{"Time":"2023-03-02T09:19:38.754769061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:187 +0x1a5\n"}
{"Time":"2023-03-02T09:19:38.754780461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler.func1()\n"}
{"Time":"2023-03-02T09:19:38.754783661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:101 +0x39\n"}
{"Time":"2023-03-02T09:19:38.754824061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x75d\n"}
FAIL: (code:1):
  % (cd server && 'env' 'ETCD_VERIFY=all' 'go' 'test' '-v' '-json' '-short' '-timeout=3m' '--race=true' '--cpu=4' './...' '-p=2')
{"Time":"2023-03-02T09:19:38.754838961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1846 +0x99\n"}
{"Time":"2023-03-02T09:19:38.754854961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1446 +0x216\n"}
{"Time":"2023-03-02T09:19:38.754893461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1844 +0x7ec\n"}
{"Time":"2023-03-02T09:19:38.754908961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1726 +0xa84\n"}
{"Time":"2023-03-02T09:19:38.754957861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler()\n"}
{"Time":"2023-03-02T09:19:38.754961061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:101 +0x3b6\n"}
{"Time":"2023-03-02T09:19:38.754976161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.NewStore()\n"}
{"Time":"2023-03-02T09:19:38.754979361Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore.go:111 +0x331\n"}
{"Time":"2023-03-02T09:19:38.754991061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.TestHashByRevValue()\n"}
{"Time":"2023-03-02T09:19:38.754994261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/hash_test.go:36 +0xa4\n"}
{"Time":"2023-03-02T09:19:38.755010061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1446 +0x216\n"}
{"Time":"2023-03-02T09:19:38.755024461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x47\n"}

=== Failed
=== FAIL: storage/mvcc  (0.00s)
=== CONT
    testing.go:1319: race detected during execution of test
FAIL
FAIL	go.etcd.io/etcd/server/v3/storage/mvcc	9.852s
```

After using the following command to reproduce it, we can get the error
like:

```bash
go test -v -p=2 --cpu=4 -count=1000 -failfast --race=true -short -timeout=30m ./
--- PASS: TestHashByRevValueLastRevision (0.12s)
==================
WARNING: DATA RACE
Read at 0x00c002024043 by goroutine 65745:
  testing.(*common).logDepth()
      /usr/lib/go-1.19/src/testing/testing.go:883 +0xc4
  testing.(*common).log()
      /usr/lib/go-1.19/src/testing/testing.go:876 +0xa4
  testing.(*common).Logf()
      /usr/lib/go-1.19/src/testing/testing.go:927 +0x6a
  testing.(*T).Logf()
      <autogenerated>:1 +0x75
  go.uber.org/zap/zaptest.testingWriter.Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zaptest/logger.go:130 +0x12c
  go.uber.org/zap/zaptest.(*testingWriter).Write()
      <autogenerated>:1 +0x7e
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/core.go:99 +0x199
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/entry.go:255 +0x2ce
  go.uber.org/zap.(*Logger).Info()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/logger.go:220 +0x6a
  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Compact()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/index.go:194 +0x144
  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).scheduleCompaction()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore_compaction.go:29 +0xbb
  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).compact.func1()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore.go:235 +0x9e
  go.etcd.io/etcd/pkg/v3/schedule.job.Do()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:41 +0x70
  go.etcd.io/etcd/pkg/v3/schedule.(*job).Do()
      <autogenerated>:1 +0x29
  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:206 +0x101
  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).run()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:187 +0x1a5
  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler.func1()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:101 +0x39

Previous write at 0x00c002024043 by goroutine 65743:
  testing.tRunner.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1433 +0x7e4
  runtime.deferreturn()
      /usr/lib/go-1.19/src/runtime/panic.go:476 +0x32
  testing.(*T).Run.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x47

Goroutine 65745 (running) created at:
  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:101 +0x3b6
  go.etcd.io/etcd/server/v3/storage/mvcc.NewStore()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore.go:111 +0x331
  go.etcd.io/etcd/server/v3/storage/mvcc.TestHashByRevValueLastRevision()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/hash_test.go:76 +0xa4
  testing.tRunner()
      /usr/lib/go-1.19/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x47

Goroutine 65743 (running) created at:
  testing.(*T).Run()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      /usr/lib/go-1.19/src/testing/testing.go:1446 +0x216
  testing.runTests()
      /usr/lib/go-1.19/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      /usr/lib/go-1.19/src/testing/testing.go:1726 +0xa84
  main.main()
      _testmain.go:265 +0x2e9
==================
```

The schedule for compact is handled asynchronously and it might use
`t.Logf` after go-test marks the case is done. And there is a comment
from go-test:

```go
// c69ff3a7d0/src/testing/testing.go (LL1580C3-L1582C16)
                // Do not lock t.done to allow race detector to detect race in case
		// the user does not appropriately synchronize a goroutine.
		t.done = true
```

We need to ensure that all the goroutines should be closed before case
finish.

REF:

[1]: https://github.com/etcd-io/etcd/actions/runs/4312405975/jobs/7522924734

[2]: https://github.com/gotestyourself/gotestsum/issues/310

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 10:58:00 +08:00
Benjamin Wang f9bdd8c96c
Merge pull request #15502 from chaochn47/deflake_TestMemberList
deflake member_test: enable pre-vote by default and add retry
2023-03-18 07:55:02 +08:00
Benjamin Wang 6cfe4bcf1f
Merge pull request #15501 from chaochn47/defake_TestTracing
deflake TestTracing
2023-03-18 07:24:02 +08:00
Chao Chen d7f992c351 enable pre-vote by default and add retry on member_test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 15:15:13 -07:00
Chao Chen f163af2bc8 deflake TestTracing
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:39:18 -07:00
Chao Chen fcdf0ebd81 document measure-test-flakiness.sh
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:15:54 -07:00
Benjamin Wang 4e0e6bdb0f
Merge pull request #15493 from jmhbnz/main
Rename pr and issue triage docs to fix links
2023-03-17 06:55:08 +08:00
James Blair 91a5f01a4e
Add detailed long description for etcdctl txn.
Include an example stdin usage and a link for full docs.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-17 11:38:56 +13:00
James Blair f312316e81
Rename pr and issue triage docs to fix broken links.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-17 10:26:34 +13:00