Kafuu Chino
ed10ca13f4
*: avoid closing a watch with ID 0 incorrectly
...
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>
add test
1
1
1
2022-10-10 19:54:58 +08:00
Hitoshi Mitake
0c6e466024
*: handle auth invalid token and old revision errors in watch
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-04 22:49:06 +09:00
Benjamin Wang
cc1b0e6a44
do not get previous K/V for create event
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-01 13:11:46 +08:00
Benjamin Wang
6071b1c523
Support configuring MaxConcurrentStreams for http2
...
Backport https://github.com/etcd-io/etcd/pull/14219 to 3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 14:25:29 +08:00
Benjamin Wang
07d2b1d626
support linearizable renew lease for 3.4
...
Cherry pick https://github.com/etcd-io/etcd/pull/13932 to 3.4.
When etcdserver receives a LeaseRenew request, it may be still in
progress of processing the LeaseGrantRequest on exact the same
leaseID. Accordingly it may return a TTL=0 to client due to the
leaseID not found error. So the leader should wait for the appliedID
to be available before processing client requests.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-19 13:34:55 +08:00
Benjamin Wang
1abf085cfb
fix all the pipeline failues for release 3.4
...
Items resolved:
1. fix the vet error: possible misuse of reflect.SliceHeader;
2. fix the vet error: call to (*T).Fatal from a non-test goroutine;
3. bump package golang.org/x/crypto, net and sys;
4. bump boltdb from 1.3.3 to 1.3.6;
5. remove the vendor directory;
6. remove go 1.12.17 and 1.15.15, add go 1.16.15 into pipeline;
7. bump go version to 1.16 in go.mod;
8. fix the issue: compile: version go1.16.15 does not match go tool version go1.17.11,
refer to https://github.com/actions/setup-go/issues/107 ;
9. fix data race on compactMainRev and watcherGauge;
10. fix test failure for TestLeasingTxnOwnerGet in cluster_proxy mode.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-22 05:28:45 +08:00
Hitoshi Mitake
757a8e8f5b
*: implement a retry logic for auth old revision in the client
2022-04-29 23:46:24 +09:00
Chao Chen
04d47a93f9
backport from #13467 exclude the same alarm type activated by multiple peers
2021-11-12 14:17:14 -08:00
Chao Chen
dbde4f2d5e
Backport-3.4 exclude alarms from health check conditionally
2021-05-04 10:37:12 -07:00
Lili Cosic
0b7e4184e8
etcdserver,wal: Convert int to string using rune()
2021-04-19 11:18:13 +02:00
Chris Wedgwood
656dc63eab
etcdserver: fix incorrect metrics generated when clients cancel watches
...
Manual cherry-pick of 9571325fe85173a60c89d6ac6ce3491c7b1ec7a4 for
release-3.4.
2021-03-31 22:59:29 -07:00
Piotr Tabor
30799c97be
Merge pull request #12815 from dbavatar/release-3.4-peervalidation
...
etcdserver: Fix PeerURL validation
2021-03-30 12:54:32 +02:00
Chao Chen
f27ef4d343
[Backport-3.4] etcdserver/api/etcdhttp: log successful etcd server side health check in debug level
...
ref. #12677
ref. 0b9cfa8677
2021-02-08 21:44:44 -08:00
Gyuho Lee
e71e0c5c88
Merge pull request #12226 from jingyih/fix_backport_PR12216
...
*: add plog logging to the backport of PR12216
2020-08-18 08:48:09 -07:00
Gyuho Lee
299e0f17aa
Revert "etcdserver/api/v3rpc: "MemberList" never return non-empty ClientURLs"
...
This reverts commit 0372cfc7ab1052ac616ca34551f83657a8fd2e3e.
2020-08-18 08:45:38 -07:00
jingyih
75d5e78d1f
*: fix backport of PR12216
...
Fix bugs introduced in commit c60dabf
2020-08-16 15:01:18 +08:00
jingyih
c60dabf2f3
*: add experimental flag for watch notify interval
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-15 10:24:25 -07:00
Gyuho Lee
0372cfc7ab
etcdserver/api/v3rpc: "MemberList" never return non-empty ClientURLs
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
cr https://code.amazon.com/reviews/CR-29712724
2020-07-16 16:29:51 -07:00
Sahdev P. Zala
9a24f73f7b
Discovery: do not allow passing negative cluster size
...
When an etcd instance attempts to perform service discovery, if a
cluster size with negative value is provided, the etcd instance
will panic without recovery because of
2020-06-21 18:00:35 -04:00
Gyuho Lee
cfe37de6c0
rafthttp: log snapshot download duration
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-20 11:37:01 -07:00
Gyuho Lee
a668adba78
rafthttp: improve snapshot send logging
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-18 11:39:24 -07:00
Gyuho Lee
9bad82fee5
*: make sure snapshot save downloads SHA256 checksum
...
ref. https://github.com/etcd-io/etcd/pull/11896
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-17 17:38:42 -07:00
Gyuho Lee
f1ea03a7c8
etcdserver/api/snap: exclude orphaned defragmentation files in snapNames
...
ref. https://github.com/etcd-io/etcd/pull/11900
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-17 14:21:02 -07:00
Ted Yu
4079deadb4
etcdserver: continue releasing snap db in case of error
...
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-17 14:15:26 -07:00
Viacheslav Biriukov
87fc3c9e57
etcdserver,wal: fix inconsistencies in WAL and snapshot
...
etcdserver/*, wal/*: changes to snapshots and wal logic
etcdserver/*: changes to snapshots and wal logic to fix #10219
etcdserver/*, wal/*: add Sync method
etcdserver/*, wal/*: find valid snapshots by cross checking snap files and wal snap entries
etcdserver/*, wal/*:Add comments, clean up error messages and tests
etcdserver/*, wal/*: Remove orphaned .snap.db files during Release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-15 08:40:09 -07:00
Changxin Miao
9c8554573f
etcdserver: watch stream got closed once one request is not permitted ( #11708 )
2020-04-06 07:06:57 -07:00
Gyuho Lee
e63db56cc9
etcdserver/api/v3rpc: handle api version metadata, add metrics
...
ref.
https://github.com/etcd-io/etcd/pull/11687
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 17:17:04 -07:00
Gyuho Lee
0b9cfa8677
etcdserver/api/etcdhttp: log server-side /health checks
...
ref.
https://github.com/etcd-io/etcd/pull/11704
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 16:29:24 -07:00
Rafael Fernández López
257319fb18
etcdserver: fix quorum calculation when promoting a learner member
...
When promoting a learner member we should not count already a voting
member, but take only into account the number of existing voting
members and their current status (started, unstarted) when taking the
decision whether a learner member can be promoted.
Before this change, it was impossible to grow from a quorum N to a N+1
through promoting a learning member.
Fixes : #11633
2020-02-21 23:14:55 -08:00
jingyih
770674e4a6
etcdserver: corruption check via http
...
During corruption check, get peer's hashKV via http call.
2020-02-18 14:12:19 -08:00
Joe Betz
6d646c442a
mvcc/backend: Delete orphaned db.tmp files before defrag
2020-02-13 12:26:54 -08:00
Gyuho Lee
6cf418ff6d
Merge pull request #11275 from YoyinZyc/stream-support-3.4
...
rafthttp: add 3.4 stream type
2019-10-18 10:25:53 -07:00
yoyinzyc
97e68cf4e7
rafthttp: add 3.4 stream type
2019-10-17 14:33:53 -07:00
Jingyi Hu
b67862c0a6
etcdserver: strip patch version in cluster version
...
Strip patch version in cluster version metrics.
2019-10-14 17:37:49 -07:00
Jingyi Hu
6a699b6b7f
etcdserver: unset old cluster version in metrics
2019-10-14 17:35:10 -07:00
Debabrata Banerjee
3b8f812955
etcdserver: Fix PeerURL validation
...
In case of URLs that are synonyms, the current lexicographic sorting
and compare of the URLs fails with frustrating errors. Make sure to do
a full comparison between every set of PeerURLs before failing.
Fixes #11013
2019-09-16 11:49:58 -04:00
Gyuho Lee
abdb7ca17b
etcdserver/api: add "etcd_network_snapshot_send_inflights_total", "etcd_network_snapshot_receive_inflights_total"
...
Useful for deciding when to terminate the unhealthy follower.
If the follower is receiving a leader snapshot, operator may wait.
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 14:01:45 -07:00
Zeming YU
b6cfaf883b
v3rpc: fix a typo err
...
don't read return value in child goroutine which causes data race.
2019-08-06 15:09:47 -07:00
Gyuho Lee
14053ba7f7
etcdserver/api: enable 3.4 capability
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:24:40 -07:00
Gyuho Lee
6a0811a949
*: use new adt.IntervalTree interface
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 22:23:13 -07:00
Gyuho Lee
7cbe2f5dd6
etcdserver/api/v3rpc: use new "credentials" package
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:38 -07:00
Gyuho Lee
50babc16e7
etcdserver/api/v2v3: skip tests for CI
...
To fix in v3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 05:54:58 -07:00
Gyuho Lee
388d15f521
Merge pull request #10622 from philips/add-v2v3-tests
...
etcdserver: api/v2v3: add initial tests
2019-07-25 10:05:29 -07:00
Sahdev P. Zala
1cef112a79
etcdserver: do not allow creating empty role
...
Like user, we should not allow creating empty role.
Related #10905
2019-07-24 17:41:24 -04:00
Tobias Schottdorf
b9c051e7a7
raftpb: clean up naming in ConfChange
2019-07-23 10:40:03 +02:00
Nima Yahyazadeh
b1812a410f
Raft HTTP: fix pause/resume race condition
2019-06-17 11:45:25 -04:00
Jingyi Hu
f8ad8ae4ad
etcdserver: use etcdserver ErrLearnerNotReady
...
If learner is not ready to be promoted, use etcdserver.ErrLearnerNotReady
instead of using membership.ErrLearnerNotReady.
2019-05-28 18:50:13 -07:00
Jingyi Hu
f5eaaaf440
etcdserver: forward member promote to leader
2019-05-28 18:50:10 -07:00
宇慕
dfe296ac3c
etcdserver: add mayPromote check
2019-05-28 18:47:03 -07:00
Jingyi Hu
aa4cda2f5c
etcdserver: allow 1 learner in cluster
...
Hard-coded the maximum number of learners to 1.
2019-05-28 18:47:03 -07:00