Bogdan Kanivets
43bb9d5c22
server: don't panic in readonly serializable txn
...
Problem: We pass grpc context down to applier in readonly serializable txn.
This context can be cancelled for example due to timeout.
This will trigger panic inside applyTxn
Solution: Only panic for transactions with write operations
fixes https://github.com/etcd-io/etcd/issues/14110
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-08-09 00:46:50 -07:00
Benjamin Wang
4f0e92d94c
Merge pull request #14262 from mind1949/update-server-etcdserver-raft
...
server/etcdserver: check whether raftNode has stopped
2022-08-02 05:58:30 +08:00
Benjamin Wang
21995a3b76
Merge pull request #14284 from AustinBenoit/test/server_transport_test_remove
...
rafthttp: test multiple transport removes
2022-08-01 07:12:05 +08:00
Benjamin Wang
68c0cf834a
Merge pull request #14288 from VladSaioc/bugfix-goleak-watchtest
...
Fixed goroutine leak in tests/integration/clientv3/watch_test.go
2022-08-01 06:55:57 +08:00
Benjamin Wang
9e9e500d57
Merge pull request #14287 from VladSaioc/bugfix-queue-test
...
Fixed goroutine leak
2022-08-01 06:52:40 +08:00
Benjamin Wang
6b19267628
Merge pull request #14289 from VladSaioc/bugfix-goleak-watch-restore-test
...
Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
2022-08-01 06:24:36 +08:00
VladSaioc
2c89834608
Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
...
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:28:26 +02:00
VladSaioc
cbfddfe63f
Fixed goroutine leak in tests/integration/clientv3/watch_test.go
...
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:09:50 +02:00
VladSaioc
3a775201c0
Fixed goroutine leak
...
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 22:19:59 +02:00
Benjamin Wang
046c46e52e
Merge pull request #14255 from ramses/golangci-config
...
Add golangci-lint config file and `make` target.
2022-07-29 15:47:43 +08:00
Ramsés Morales
3cdc4225e1
Followup to "Add golangci-lint config file"
...
Addressed comments by @ldez and added `lint-fix` target.
Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:22 -07:00
Ramsés Morales
a7a48168a0
Add golangci-lint config file and make
target.
...
Here we add file `.golangci.yaml`, to have a common configuration for
static analysis. If you use the following IDEs/editors, they will read
the file:
- `vim` with vim-go.
- VSCode.
The initial configuration file is based on Kubernetes' HEAD. We removed
a custom kubernetes-linter for custom kubernetes-logging. We also
changed to Golang version 1.17 (etcd's current target Golang version)
from 1.18.
Also, we added a new target to `Makefile`: `lint`. NOTE that auto-fixing
should be part of a later commit, once we are all happy with how the
configuration file is working for us.
As expected, this change fixes two issues found by this `.golangci.yaml`
in file `contrib/lock/client/client.go`:
- Dead code, removed.
- Innefective assignment, removed.
Finally, we are updating `CONTRIBUTING.md` to mention `golangci-lint`.
We will add a GitHub-action to run `golangci-lint` in a future change.
Local testing done:
- `make build`.
- `make test`.
Both are happy.
This is the initial step to fix
https://github.com/etcd-io/etcd/issues/14164 .
Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:08 -07:00
Austin Benoit
ff56da7745
rafthttp: test transport multiple transport removes
...
Unit test to verify multiple transport removes does not create an
issue.
Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-28 18:23:17 -04:00
Marek Siarkowicz
223b33f23c
Merge pull request #14283 from tjungblu/issue_14275
...
Reduce ExpectFunc polling interval
2022-07-28 14:57:49 +02:00
Thomas Jungblut
eb59368440
Reduce ExpectFunc polling interval.
...
Fixes issue 14275, flakes close to timeout like TestKVDelete.
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-28 14:38:44 +02:00
Benjamin Wang
5d96a7273b
Merge pull request #14261 from tjungblu/update_locking
...
update contrib/lock example
2022-07-28 15:18:47 +08:00
Joe Betz
0535742a1f
Transition my maintainer status to emeritus
...
My responsibilities have long since been handed off to ptab@google.com and siarkowicz@google.com . I'd like to reflect that here in the MAINTAINERS file.
2022-07-27 09:50:10 -07:00
Benjamin Wang
fae4650834
Merge pull request #14280 from falser101/fix/zjf
...
fix: code cleanup
2022-07-27 07:20:43 +08:00
Benjamin Wang
37e4193c60
Merge pull request #14272 from serathius/memberID
...
memberID equals zero in corruption alarm
2022-07-27 06:32:52 +08:00
Marek Siarkowicz
c04c65c181
Merge pull request #14278 from clarkfw/migrate-member-tests
...
tests: Migrate member list tests to common framework
2022-07-26 19:17:36 +02:00
Clark
13d20f8d28
tests: Migrate member list tests to common framework
...
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-07-26 23:28:19 +08:00
jianfei.zhang
c26d7f5389
fix: code cleanup
...
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-07-26 22:07:22 +08:00
Marek Siarkowicz
bb7e4653c8
tests: Fix member id in CORRUPT alarm
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 15:55:22 +02:00
Marek Siarkowicz
a3b410cac7
Merge pull request #14120 from serathius/compact-check
...
server: Implement compaction hash checking
2022-07-26 15:36:31 +02:00
Benjamin Wang
66edfab75f
Merge pull request #14277 from ahrtr/3.4.20_changelog
...
Update changelog for 3.4.20
2022-07-26 21:24:58 +08:00
Benjamin Wang
cfa3b5b956
Update changelog for 3.4.20
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-26 16:38:00 +08:00
Marek Siarkowicz
d44bbff278
server: Make corrtuption check optional and period configurable
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:15 +02:00
Marek Siarkowicz
6697fca97d
server: Implement compaction hash checking
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:14 +02:00
Marek Siarkowicz
5fab045242
Merge pull request #14273 from RobertIndie/fix-test
...
tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go
2022-07-26 09:22:57 +02:00
mind1949
f3bd535747
server/etcdserver: fix test
...
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-25 23:20:21 +08:00
Zike Yang
b77f56ac25
tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go
...
In the test `testNonleaderElectionTimeoutRandomized`, the possible values of election timeout randomized out should be 10-19(inclusive), but the current test only tests the possible values as 11-19(inclusive), which is incorrect here. We need to expand the scope of the tests to ensure robustness, and also to make the logic clearer.
Signed-off-by: Zike Yang <zike@apache.org>
2022-07-25 23:16:02 +08:00
Marek Siarkowicz
f0f750f4c0
tests: Cover periodic check in tests
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:31 +02:00
Marek Siarkowicz
c58ec9fe13
server: Refactor compaction checker
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
Marek Siarkowicz
264498258b
tests: Move CorruptBBolt to testutil
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
Marek Siarkowicz
99b982e71a
tests: Rename corruptHash to CorruptBBolt
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:28:30 +02:00
Benjamin Wang
4977877730
Merge pull request #14231 from mitake/changelog-3.4-for-pr-14230
...
update changelog-3.4 to protection for rangePermCache with a RW lock
2022-07-25 07:24:12 +08:00
Hitoshi Mitake
97222a5277
update changelog-3.4 to protection for rangePermCache with a RW lock
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-07-24 23:34:05 +09:00
mind1949
2b0596f859
server/etcdserver: check if raftNode has been stopped
...
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-23 08:49:07 +08:00
Thomas Jungblut
118ab24b39
update contrib/lock example
...
Updating the locking example to avoid relying on GC to break the lease.
Updating the documentation to reflect the build process better, improve
error messages and logging to not confuse first time users.
Fixes #14224
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-22 12:14:37 +02:00
Benjamin Wang
6d27a42b7d
Merge pull request #14248 from ahrtr/update_TestRemoveMatchFile
...
No need to manually remove tmp directory created by t.TempDir()
2022-07-21 17:31:43 +08:00
Marek Siarkowicz
4c2aab97c8
Merge pull request #14247 from AustinBenoit/update_readme
...
readme: remove broken roadmap link
2022-07-21 11:20:36 +02:00
Benjamin Wang
b71a641c93
Merge pull request #14235 from Abirdcfly/main
...
delete unreachable code
2022-07-21 13:54:01 +08:00
Abirdcfly
37b920e9f4
delete unreachable code
...
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-21 12:54:29 +08:00
Benjamin Wang
f6cfd465cc
No need to manually remove tmp directory created by t.TempDir()
...
The temporary directory created by t.TempDir() can be automatically removed by
the golang testing utilities. So no need to remove it manually.
FYI.
https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L911-L915
https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L957
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 08:20:52 +08:00
Austin Benoit
790a461c16
readme: remove broken roadmap link
...
The ROADMAP.md file was deleted as a part of commit
a722827c96162d7d06e72cadfaed223793dc4d78 and the readme
file was not updated. I could not find a suitable alternative
resource so I am removing the link.
Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-20 19:37:27 -04:00
Benjamin Wang
b75aa3eb4c
Merge pull request #14242 from Elbehery/etcd-mixin_replace_backend_with_database
...
etcd-mixin: fix etcdDatabaseQuotaLowSpace alert name
2022-07-20 12:40:56 +08:00
Mustafa Elbehery
75d7bd0155
etcd-mixin: fix etcdDatabaseQuotaLowSpace alert name
...
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2022-07-20 06:11:13 +02:00
Sahdev Zala
2ef4043979
Merge pull request #14237 from Elbehery/use-last_over_time
...
etcd-mixin: use-last_over_time-with-etcdBackendQuotaLowSpace-alert
2022-07-19 21:43:57 -04:00
Benjamin Wang
674ef6c32f
Merge pull request #14221 from Elbehery/add_etcdBackendHighFragmentationRatio_alert
...
etcd-mixin:add etcdDatabaseHighFragmentationRatio alert
2022-07-20 05:20:09 +08:00
Mustafa Elbehery
0d0fc573ba
etcd-mixin:use-last_over_time-with-etcdBackendQuotaLowSpace-alert
...
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2022-07-19 18:10:19 +02:00