Benjamin Wang
1c20ed2cc5
Merge pull request #14521 from lovehhf/remove_pick_peer_url
...
membership: Remove PickPeerURL Method
2022-09-27 02:10:35 +08:00
Hongfei Huang
f6d808736c
membership: Remove PickPeerURL Method
...
PickPeerURL only used by unit test
Signed-off-by: Hongfei Huang <853885165@qq.com>
2022-09-26 23:21:10 +08:00
Kafuu Chino
f1d4935e91
*: avoid closing a watch with ID 0 incorrectly
...
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>
add test
2022-09-26 20:30:33 +08:00
Benjamin Wang
7f10dccbaf
Bump go 1.19: update all the dependencies and go.sum files
...
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
Marek Siarkowicz
026794495f
Merge pull request #14494 from demoManito/remove/redundant-type-conversion
...
etcd: remove redundant type conversion
2022-09-21 11:34:19 +02:00
Benjamin Wang
2441a24cee
Merge pull request #14493 from demoManito/style/format-import-order
...
etcd: format import order
2022-09-21 06:03:31 +08:00
demoManito
f67ec10779
etcd: format import order
...
golang CodeReviewComments:
https://github.com/golang/go/wiki/CodeReviewComments#imports
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 18:41:39 +08:00
demoManito
a9c3d56508
etcd: remove redundant type conversion
...
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
Benjamin Wang
159ed15afc
Merge pull request #14479 from demoManito/fix/declaring-empty-slice
...
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
Hitoshi Mitake
2dcfa83094
*: handle auth invalid token and old revision errors in watch
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-09-17 21:51:36 +09:00
demoManito
72cf0cc04a
etcd: modify declaring empty slices
...
declare an empty slice to var s []int replace s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
spacewander
508ce517e0
update according to the review
...
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-17 09:25:37 +08:00
spacewander
bebefd8b80
chore: log when an invalid watch request is received
...
As protobuf doesn't have required field, user may send an empty
WatchRequest by mistake. Currently, etcd will ignore the invalid request
and keep the stream opening. If we don't reject the invalid request by
closing the stream, it would be better to leave a log there.
This commit also fixes a typo in the comment.
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-16 11:33:01 +08: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
杨金珏
6220174687
support custom grpc.MaxConcurrentStreams
...
There is no update on the original PR (see below) for more then 2
weeks. So Benjamin(@ahrtr) continues to work on the PR. The first
step is to rebase the PR, because there are lots of conflicts with
the main branch.
The change to go.mod and go.sum reverted, because they are not needed.
The e2e test cases are also reverted, because they are not correct.
```
https://github.com/etcd-io/etcd/pull/14081
```
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
SimFG
107b7c06ab
sanp: Delete the nil judgment of the log object
...
Move some methods into the `Snapshotter` object for removing the `lg == nil` judgment
Signed-off-by: SimFG <1142838399@qq.com>
2022-06-28 19:35:33 +08:00
chavacava
756d77663b
removes empty option in JSON tag
...
option can not be empty in JSON tag
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-26 12:13:20 +02:00
L2ncE
637afd359b
Fix a syntax error in a code comment
...
Signed-off-by: L2ncE <llance_24@foxmail.com>
2022-06-15 23:19:12 +08:00
Marek Siarkowicz
2b090e86a6
server: Extract hasher to separate interface
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
Marek Siarkowicz
80828b593a
server: Remove duplicated compaction revision
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
Marek Siarkowicz
34a02ba621
server: Return revision range that hash was calcualted for
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:17 +02:00
Marek Siarkowicz
72a84ddbcf
server: Fix broken code during merge
2022-06-09 13:34:33 +02:00
Sahdev Zala
d9e5460ca8
Merge pull request #13829 from qsyqian/feature/skip_compact_when_rev_not_change
...
skip compact when rev not change at period compact mode
2022-06-08 22:54:39 -04:00
Piotr Tabor
5097b33ab9
Rename etcdserver/etcderrors package to etcdserver/errors.
2022-05-20 14:32:04 +02:00
Piotr Tabor
c78bf655a7
Simplify imports and improve comments.
2022-05-20 14:32:04 +02:00
Piotr Tabor
47a771871b
Move apply to its own package (no dependency on etcdserver).
2022-05-20 14:32:04 +02:00
Piotr Tabor
fc6a6c3c27
Move etcdserver/errors.go to sepatate package to avoid cyclic dependencies.
2022-05-20 14:32:04 +02:00
Piotr Tabor
b073129d03
Applier does not depend on EtcdServer any longer.
...
All the depencies are explicily passed to the UberApplier factory method.
2022-05-20 14:32:04 +02:00
Piotr Tabor
651de5a057
Rename EtcdServer.Id with EtcdServer.MemberId.
...
It was misleading and error prone vs. ClusterId.
2022-05-20 14:32:04 +02:00
ahrtr
b32ac1f67b
fix a typo: print the correct error info
2022-05-19 07:19:44 +08:00
ahrtr
e7f8bf7c44
enhance the /version endpoint to add storageVersion
2022-05-06 20:29:42 +08:00
Marek Siarkowicz
26f42e7a9e
server: Apply review comments and split basic handler
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
fb361e43f0
server: Split code for debug and version endpoints
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
722ec487df
server: Split metrics and health code
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
600ee13ac0
server: Cover V3 health with tests
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e9dec74ded
server: Refactor health checks
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
191aed645e
server: Run health check tests in subtests
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e4e391792a
server: Rename test case expect fields
2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0fb194d6f2
server: Use named struct initialization in healthcheck test
2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0096d2ecdb
server: Remove unused NewClientHandler
2022-05-05 09:52:13 +02:00
ahrtr
1b3d6cb0c8
set an separate applyTimeout for the waitAppliedIndex
2022-04-10 14:44:55 +08:00
Donal Hunt
d659403955
Update server/etcdserver/api/v3rpc/maintenance.go
...
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:45:13 +01:00
Donal Hunt
4c8ef011e0
*: drop use of humanize.Time() in favour of time.Duration.String()
...
humanize.Time() drops precision resulting in some events reporting they took
"now" time to complete. Using time.Duration.String() results in accurate
duration being reported.
Fixes #13905
2022-04-07 23:24:35 +01:00
Marek Siarkowicz
804fddf921
tests: Use zaptest.NewLogger in tests
2022-04-04 13:03:15 +02:00
qsyqian
2ed87b9f2f
skip compact when rev not change at period compact mode
2022-03-24 20:59:25 +08:00
ahrtr
f978da4f4f
move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery
2022-03-24 06:18:25 +08:00
ahrtr
edce939f6e
add one more field storageVersion into StatusResponse
...
When performing the downgrade operation, users can confirm whether each member
is ready to be downgraded using the field 'storageVersion'. If it's equal to the
'target version' in the downgrade command, then it's ready to be downgraded;
otherwise, the etcd member is still in progress of processing the db file.
2022-03-18 07:04:44 +08:00
ahrtr
1a3822f2c3
Rename ClientConfig to ConfigSpec
...
The ClientConfig is a fully declarive configuration, so it makes more
sense to rename it to ConfigSpec. It can also mitigate the confusion
between Config and ClientConfig.
2022-03-13 05:41:49 +08:00
ahrtr
3dcbbf62d9
Move clientconfig into clientv3 so that it can be reused by both etcdctl and v3 discovery
2022-03-12 06:38:41 +08:00
ahrtr
2f36e0c62b
Change discovery url to endpoints
...
Currently the discovery url is just one endpoint. But actually it
should be the same as the etcdctl, which means that it should be
a list of endpoints. When one endpoint is down, the clientv3 can
fail over to the next endpoint automatically.
2022-02-24 09:11:41 +08:00