1
0
mirror of https://github.com/etcd-io/etcd.git synced 2026-02-05 15:46:51 +01:00

711 Commits

Author SHA1 Message Date
Benjamin Wang
05d32d4d1b Merge pull request #21122 from zhijun42/fix-lease-keep-alive-unavailable
lease: Fix incorrect gRPC Unavailable on client cancel during LeaseKeepAlive forwarding
2026-02-03 09:50:05 +00:00
Zhijun
b54c88406f Helps solve the leaseKeepAlive grpc Unavailable issue while maintaining existing behavior
Signed-off-by: Zhijun <dszhijun@gmail.com>
2026-02-03 09:14:04 +08:00
Benjamin Wang
e26dd624ae Merge pull request #21144 from fuweid/fix-TestV2DeprecationCase
*: fix TestV2DeprecationSnapshotMatches case
2026-01-17 12:21:12 +00:00
Benjamin Wang
25a5bb2875 Initialize confState from v3 store on bootstrap
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2026-01-16 19:01:40 +00:00
Wei Fu
a5e37a077d *: fix TestV2DeprecationSnapshotMatches case
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-16 10:30:56 -05:00
Benjamin Wang
e74bb6a0ea do not load v2 snapshot on bootstrap
In this commit, we don't load v2 snapshot files (*.snap) anymore,
instead we just pick the latest snapshot entry from WAL. We don't
need the raftpb.Snapshot.Data anymore, so it's correct to just
read the latest snapshot entry from WAL.

The end goal is to completely get rid of v2 snapshot, which means
we don't read v2 snapshot, nor write it. But in order to be compatible
with 3.6, we still need to write v2 snapshot. This PR just stops
reading v2 snapshot, so that it's safe to completely remove it in 3.8.

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2026-01-13 10:38:04 +00:00
Antonio Ojea
87de8541ae enable linter for deprecated functions
enable the linter and just tag each exception with a TODO so we
have identified the existing ones but we can gate to avoid adding
new deprecated functions.

Signed-off-by: Antonio Ojea <aojea@google.com>
2026-01-09 16:35:01 +00:00
Marek Siarkowicz
fdedec1edb Remove v2 store
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2026-01-08 12:35:10 +01:00
Marek Siarkowicz
f79c917a40 Handle non-existent member in v3 backend and implement matching membership tests for v3 backend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2026-01-07 20:18:42 +01:00
Benjamin Wang
aef0361938 Merge pull request #21038 from ahrtr/20251219_metrics
Add a new metrics etcd_server_request_duration_seconds to track e2e duration for each request
2025-12-30 12:05:05 +00:00
A.D
3553655ff5 cleanup: remove redundant panicAlternativeStringer
Signed-off-by: A.D <1695316070@qq.com>
2025-12-23 20:27:56 +08:00
Ivan Valdes
ff30e0dcdd Fix revive var-naming warning in errors package
Updating github.com/golangci/golangci-lint/v2 to 2.7.2 raises the
following error:

% 'golangci-lint' 'run' '--config'
  '/var/home/ivan/Code/Personal/etcd/etcd/tools/.golangci.yaml' '--fix'
  './...' './api/...' './cache/...' './client/pkg/...' './client/v3/...'
  './ etcdctl/...' './etcdutl/...' './pkg/...' './server/...'
  './tests/...' './tools/mod/...' './tools/rw-heatmaps/...'
  './tools/testgrid-analysis/...'

../server/etcdserver/errors/errors.go:15:9: var-naming: avoid package
names that conflict with Go standard library package names (revive)
package errors ^ 1 issues:
* revive: 1

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-12-22 22:44:48 -08:00
Benjamin Wang
9cdb1cf8fb Add a new metrics etcd_server_request_duration_seconds to track e2e duration for each request
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-12-20 09:16:28 +00:00
Thomas Jungblut
71a9ffe87e Instrument watchstream send loop
This PR adds a few more timing metrics to the watch send loop.
We're currently trying to track down some sort of contention affecting
all gRPC endpoints, we see a hard QPS ceiling when the apiserver restarts with
watch cache inits.

There's currently no metric to help us pinpoint where the time is going
to create such a ceiling, thus adding some more metrics here.

Somewhat related to #15402.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2025-12-19 15:16:11 +01:00
mingl1
230db05c24 v3rpc: add and use getServerMetrics() with global metricsServerCached
Signed-off-by: mingl1 <minglin.me@gmail.com>
2025-11-07 09:31:21 -05:00
Fu Wei
8a4955b2ef Merge pull request #20589 from aaronjzhang/improve-lease-renew
etcdserver: improve linearizable renew lease
2025-10-30 22:22:11 -04:00
Fu Wei
37531e62f6 Merge pull request #20792 from xUser5000/fix/cannot-promote-member-from-follower-when-auth-is-enabled
etcdserver: Fix: cannot promote member from follower when auth is enabled
2025-10-30 21:20:08 -04:00
Aaron Zhang
ec3bc3c74e etcdserver: improve linearizable renew lease
- Add FastLeaseKeepAlive feature gate that allows skipping the wait for the applied index when renewing an existing lease.
- Update 3.7 changelog, add support for faster lease renewal.
- Update e2e tests for lease keep-alive to run each case with FastLeaseKeepAlive enabled and disabled.

Signed-off-by: Aaron Zhang <aaron.zhang@mavenir.com>
2025-10-30 01:35:50 -05:00
xUser5000
179f3e8391 etcdserver: follow convention to extract auth token in cluster_util.go
Signed-off-by: xUser5000 <abdallahar1974@gmail.com>
2025-10-29 00:29:16 +03:00
Ashwani Kumar Kamal
61cffd5e21 etcdserver: remove admin check on authstatus api
Any client managing their own JWTs outside of etcd, need to
track the auth revision to create another token.
One possible solution is to loosen the access control on
AuthStatus so that you can always get the latest authRevision no matter
whether or not you have a valid token.

Signed-off-by: Ashwani Kumar Kamal <ashwanikamal.im421@gmail.com>
2025-10-22 23:27:45 +05:30
xUser5000
88717004fb etcdserver: fix cannot promote with auth from follower
When auth is enabled, sending a promotion request to a follower node was failing because
the auth token was not being propagated when the follower forwards the request to the leader.

Signed-off-by: xUser5000 <abdallahar1974@gmail.com>
2025-10-12 23:52:54 +03:00
Benjamin Wang
22758cfb7b Fix endpoint status not retuning the correct storage quota
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-10-10 18:41:18 +01:00
Marek Siarkowicz
d67e847b4d Merge pull request #20734 from serathius/refactor-v2apply
Move v2 apply logic into apply directory
2025-10-02 12:04:04 +02:00
Marek Siarkowicz
42ba3043c2 Move v2 apply logic into apply directory
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-10-02 10:59:42 +02:00
Benjamin Wang
353107914b Merge pull request #20737 from yajianggroup/main
chore: fix some typos in comment
2025-09-28 11:25:52 +01:00
yajianggroup
ab7ba34005 chore: fix some typos in comment
Signed-off-by: yajianggroup <yajianggroup@outlook.com>
2025-09-28 16:00:23 +08:00
Marek Siarkowicz
268db19f8d Split apply.go into file per type of applier
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-09-27 15:29:03 +02:00
Marek Siarkowicz
afeab20ac5 Reject watch request with -1 revision and make rangeEvents safe against negative revision
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2025-09-23 12:25:37 +02:00
shenmu.wy
92897f2d44 fix 20271: protect backend usage from concurrent applySnapshot and defrag
Signed-off-by: shenmu.wy <shenmu.wy@antfin.com>
2025-09-11 16:13:54 +08:00
cuiweixie
281239251f remove unused comment
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
2025-08-21 17:49:26 +08:00
cuiweixie
d91cf2bf52 server/etcdservere: refactor server to use atomic types
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
2025-08-21 17:14:01 +08:00
Aleksander Mistewicz
57870e43bb Add OpenTelemetry Spans to Lease methods
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-08-19 17:21:34 +02:00
Aleksander Mistewicz
7f015aa3c2 Add more attributes to OpenTelemetry Txn spans
Add new helper functions and move them to a separate file.

Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-08-19 16:29:50 +02:00
Marek Siarkowicz
c218423621 Merge pull request #20457 from nwnt/fix-broken-failpoint-raftdropheartbeat
Fix broken failpoint labelRaftDropHeartbeat
2025-08-16 08:24:34 +02:00
Aleksander Mistewicz
986b75cc8d Move span creation to capture more attributes of Watch
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-08-12 10:44:40 +02:00
Aleksander Mistewicz
2baa8b79a7 Add OpenTelemetry Spans to Watch
It requires adding ctx to arguments of some interface methods

Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-08-12 10:44:40 +02:00
Nont
f506d07e6b Fix broken failpoint labelRaftDropHeartbeat
Signed-off-by: Nont <nont@duck.com>
2025-08-08 23:19:19 -05:00
Fu Wei
75e35405f5 Merge pull request #20389 from AwesomePatrol/add-otel-spans-to-put-compact-deleterange 2025-07-24 06:34:59 -04:00
Benjamin Wang
0e2a4212ed Check promotion against v2store when updating v2store
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-07-23 21:29:52 +01:00
Aleksander Mistewicz
c94441037c Add keys_only to OTEL span in range
Kubernetes will start using Range with KeysOnly set in 1.34:
https://github.com/kubernetes/kubernetes/pull/132355

Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-23 15:25:45 +02:00
Aleksander Mistewicz
e0b1765692 Add OTEL tracing to Compact
This cover all methods of RaftKV interface.

Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-23 15:23:38 +02:00
Aleksander Mistewicz
54f829eb45 Add OTEL tracing to Put and DeleteRange
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-23 15:20:22 +02:00
Aleksander Mistewicz
68b0024f70 Add raft events to OTEL tracing
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-23 15:19:55 +02:00
Benjamin Wang
3aa5d02918 Fix v2store check returning wrong result even there isn't any auth data
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-07-21 11:36:39 +01:00
Benjamin Wang
80b28c66b0 Merge pull request #20312 from nwnt/inject-assertions-in-place
Inject antithesis assertion in place of etcd verify.Verify
2025-07-17 16:14:21 +01:00
Nont
042f75812b Inject antithesis assertion in place
Signed-off-by: Nont <nont@duck.com>
2025-07-17 09:18:58 -05:00
Aleksander Mistewicz
a291faad71 Add OTEL tracing to Range and Txn
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-10 15:33:43 +02:00
Aleksander Mistewicz
ea627c79e2 Use traceutil.EnsureTrace instead of traceutil.New
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-08 12:08:24 +02:00
Aleksander Mistewicz
a110ee35b8 Move ensureTrace to traceutil package
Signed-off-by: Aleksander Mistewicz <amistewicz@google.com>
2025-07-08 11:59:02 +02:00
James Blair
d5537ec250 Merge pull request #20237 from ArkaSaha30/deps_mgmt_23_06_25
[2025-06-23] Manual Dependency Bump
2025-07-01 08:04:26 +12:00