2605 Commits
Author SHA1 Message Date
Gaurav Pande ec7e8c371d server/etcdserver/txn: treat a zero-length range_end as a single key
mkGteRange passed a zero-length but non-nil range end through unchanged,
and the MVCC index served it as an open-ended range, while the auth
check treats a zero-length range end as a single key. A non-nil empty
range end can reach it from a hand-crafted request on branches whose
protobuf decoder keeps a present-but-empty field as []byte{}, or from
an in-process caller on any branch.

Normalize a zero-length range end to nil so the logic is correct
regardless of the decoder. "\x00" still maps to []byte{} (the >= key
form).

Signed-off-by: Gaurav Pande <garvpande11235@gmail.com>
2026-12-02 23:02:56 +05:30
Benjamin Wang e400a20775 Merge pull request #22940 from ivanvc/20261124-dependencies
[2026-11-23] Weekly depenency bump
2026-12-01 11:47:10 +00:00
Wei Fu 7549de5d46 mvcc: avoid reading a future revision in put
put looks up the key at beginRev+1 even before the first change in
the txn. The current index returns the same result as a lookup at
beginRev. We should not rely on how the index handles future
revisions.

Use beginRev before the first change and beginRev+1 after it, just
like Range and deleteRange do.

Fix the TestStorePut case where the fake index had a key newer than
the store revision.

Add TestTxnReadOwnRevision to check that a txn can read its own write.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-11-24 19:18:09 -05:00
Ivan Valdes 25704c2710 dependency: bump golang.org/x/net from 0.62.0 to 0.63.0
Reference: https://github.com/etcd-io/etcd/pull/22916
Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-24 15:04:18 -08:00
Ivan Valdes 76b04a93b9 dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.33.0 to 2.34.0
Reference: https://github.com/etcd-io/etcd/pull/22911
Reference: https://github.com/etcd-io/etcd/pull/22921
Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-24 15:04:15 -08:00
Wei Fu 3e287446b0 deps: bump gorilla/websocket to fix GO-2026-6278
https://pkg.go.dev/vuln/GO-2026-6278

gorilla/websocket used crypto/rand for client masking keys in v1.5.2, but the
v1.5.3 rollback brought back math/rand. v1.5.3 release notes
(https://github.com/gorilla/websocket/releases/tag/v1.5.3).

The Go vulnerability database used to list v1.5.3 as fixed. It corrected the
affected range on Nov 23, so govulncheck started failing even though we didn't
change the dependency. Go vulnerability database correction
(https://go-review.googlesource.com/c/vulndb/+/861981)

Upstream switched back to crypto/rand in d67f41855da4. There is no tag with
that fix yet, so we have to use the pseudo-version for now.
Upstream fix (https://github.com/gorilla/websocket/commit/d67f41855da42d7bccd9ef050c49f7e54e783b95)

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-11-24 11:04:21 -05:00
Fu Wei 1f940dc7ec Merge pull request #22671 from fuweid/2610-index-test-update
mvcc: decouple index tests from tree internals
2026-11-24 09:18:41 -05:00
Wei Fu 5dff68a990 mvcc: decouple index tests from tree internals
Verify compaction through Compact, Keep, and Revisions instead of tree
equality, and remove the unused equality methods.

Use a real index in TestStoreRestore and fix the fixture's backend
revision to match its create and modification revisions. This mismatch
was introduced by ecba9b61cf ("storage: start initial revision at 1").

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-11-23 15:30:32 -05:00
Ivan Valdes 0db02c3883 dependency: bump golang.org/x/crypto from 0.58.0 to 0.59.0
Reference: https://github.com/etcd-io/etcd/pull/22838

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-22 15:25:24 -08:00
Ivan Valdes 182fbbdf5f dependency: bump golang.org/x/sys from 0.49.0 to 0.50.0
Reference: https://github.com/etcd-io/etcd/pull/22837

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-22 15:22:35 -08:00
Ivan Valdes 2cafcc5e0a dependency: bump github.com/prometheus/common from 0.73.1 to 0.74.0
Reference: https://github.com/etcd-io/etcd/pull/22835

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-22 15:14:33 -08:00
Benjamin Wang f872eb465e Merge pull request #22833 from swshende-cmd/OCPBUGS-141879/rafthttp-overloaded-network-log
rafthttp: remove misleading "(overloaded network)" from buffer-full warnings
2026-11-20 09:46:56 +00:00
Swapnil 06f2b3e5f6 rafthttp: remove misleading "(overloaded network)" from buffer-full warnings
Buffer-full drops only mean an in-process channel is full, not a
kernel/network failure. peer.go already omitted the suffix; align
stream.go and remote.go.

Signed-off-by: Swapnil <shendeswapnil.6@gmail.com>
2026-11-17 15:12:41 +05:30
Iván Valdés Castillo b32ff8a101 Merge pull request #22801 from MbolotSuse/proto-bump
etcdserver: bump protoc version
2026-11-16 16:39:41 -08:00
Iván Valdés Castillo bd180291ec Merge pull request #22756 from etcd-io/dependabot/go_modules/github.com/spf13/pflag-1.1.0
build(deps): bump github.com/spf13/pflag from 1.0.10 to 1.1.0
2026-11-12 08:19:04 -08:00
Fu Wei d11eca9a9c Merge pull request #22634 from NUAAwqy/taiyi/etcd-22633-v2-wal-compat
etcdserver: replay legacy v2 metadata WAL entries
2026-11-11 16:14:50 -05:00
Michael Bolot 5de6194049 etcdserver: bump protoc version
This bumps the protoc version to v36.2, and regenerates
the generated files that this produces

Signed-off-by: Michael Bolot <mbolot@udallas.edu>
2026-11-11 13:18:48 -06:00
Ivan Valdes 845bcd5ebe Bump Go to 1.27.4
Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-11 10:48:39 -08:00
dependabot[bot] dc2e3dcff7 build(deps): bump github.com/spf13/pflag from 1.0.10 to 1.1.0
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.10 to 1.1.0.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.10...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/pflag
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 17:33:30 +00:00
NUAAwqy 30b5a81ec5 etcdserver: drop expected legacy v2 WAL requests instead of replaying them
etcd 3.5 and earlier could persist v2 metadata requests (member
attribute updates and cluster version updates) to the WAL. The v2
store has been removed, so replaying such entries panics. Drop only
those two expected shapes and panic on anything that is neither a
valid InternalRaftRequest nor one of them: WAL corruption must fail
loudly, not be silently ignored. Mirror the release-3.6 behaviour in
the WAL version detection, which surfaces the original decode error
for unparseable entries instead of skipping them.

The legacy v2 request detection lives in the new internal package
server/internal/legacyv2, shared by the apply path and the WAL
version detection.

Signed-off-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com>
2026-11-08 15:22:10 +00:00
Fu Wei d622ec57cf Merge pull request #22682 from fuweid/weifu/benchmark 2026-11-06 07:29:27 -05:00
Benjamin Wang 092167b24e Merge pull request #22699 from ahrtr/20261103_alarm
Define `alarmStore` as an `atomic.Pointer` to avoid race condition
2026-11-05 10:56:13 +00:00
Ivan Valdes fef7c19f72 dependency: bump github.com/prometheus/common from 0.72.1 to 0.73.1
Reference: https://github.com/etcd-io/etcd/pull/22695

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-04 16:59:40 -08:00
Ivan Valdes 47c20d9ed5 dependency: bump golang.org/x/net from 0.61.0 to 0.62.0
Reference: https://github.com/etcd-io/etcd/pull/22694

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-04 16:57:27 -08:00
Ivan Valdes adfd38783e dependency: bump google.golang.org/grpc from 1.84.0 to 1.85.0
Reference: https://github.com/etcd-io/etcd/pull/22691

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-04 16:55:44 -08:00
Ivan Valdes 2bad5c98bb dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.32.0 to 2.33.0
References:
* https://github.com/etcd-io/etcd/pull/22690
* https://github.com/etcd-io/etcd/pull/22693

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-11-04 16:53:21 -08:00
Wei Fu 914e4f2d36 storage/mvcc: expand index Put benchmarks
Add more index Put benchmarks with fixed key spaces and different
workloads. These cases help show how key length, repeated updates,
tombstones and concurrent reads affect Put performance.

- Put: use 10k, 100k and 1m keys with 32B, 64B and 128B key lengths.
  The key lengths are based on Kubernetes storage keys.
  Test TxnSize=1/8 and keep the case that inserts b.N new keys.

- PutTombstone: initialize the index first, then run two Puts for
  every Tombstone. Use separate counters to avoid deleting a key
  twice without recreating it. Also add a 100k-key case that only
  changes a fixed range of 5k consecutive keys.

- PutCount: update existing keys while another goroutine counts
  a fixed range of 1, 10 or 1000 keys in a 100k-key index.

- PutRangeLimit: update existing keys while another goroutine runs
  a range query over all keys with limit=100. Test both
  withTotalCount=true and false.

Share the generated keys between benchmarks without changing them.
Keep key generation, sorting and index setup outside the timer.
Use zap.NewNop() and report allocations.

In one linux/amd64 run on EPYC 7763 with 100k 64B keys:
- Count1/10/1000: 1.77 / 2.10 / 52.61 us per Put.
- RangeLimit100 with total count: 4.45 ms per Put.
- RangeLimit100 without total count: 14.05 us per Put.

With total count enabled, Range still holds the read lock and scans
all keys after collecting 100 results. Put has to wait for this scan
to finish, which makes it much slower in this case.

```bash
$ cd server/storage/mvcc
$ go test ./ \
  -bench '^BenchmarkIndexPutRangeLimit$/^Keys=100000,KeyLength=64,Limit=100,WithTotalCount=true$' \
  -benchtime=1001x -count=1 -benchmem \
  -o /tmp/mvcc-profile.test \
  -mutexprofile=/tmp/index-true.mutex.pprof \
  -mutexprofilefraction=1 \
  -blockprofile=/tmp/index-true.block.pprof \
  -blockprofilerate=1

goos: linux
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=64,Limit=100,WithTotalCount=true-32               1001           3717208 ns/op           15026 B/op         29 allocs/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  17.217s

$ go tool pprof -top -focus='treeIndex.*Put' \
>   /tmp/mvcc-profile.test /tmp/index-true.block.pprof
File: mvcc-profile.test
Build ID: 66e63f4ace4b9a35e21538a81f97947da88de2ec
Type: delay
Time: 2026-11-02 00:55:09 UTC
Active filters:
   focus=treeIndex.*Put
Showing nodes accounting for 3.71s, 2.03% of 182.62s total
Dropped 4 nodes (cum <= 0.91s)
      flat  flat%   sum%        cum   cum%
     3.71s  2.03%  2.03%      3.71s  2.03%  sync.(*RWMutex).Lock
         0     0%  2.03%      3.71s  2.03%  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Put
         0     0%  2.03%      3.71s  2.03%  go.etcd.io/etcd/server/v3/storage/mvcc.BenchmarkIndexPutRangeLimit.func1
         0     0%  2.03%      3.71s  2.03%  go.etcd.io/etcd/server/v3/storage/mvcc.benchmarkIndexPutRangeLimit
         0     0%  2.03%      3.71s  2.03%  go.etcd.io/etcd/server/v3/storage/mvcc.benchmarkIndexPutWithRead
         0     0%  2.03%      3.71s  2.03%  testing.(*B).doBench.gowrap1
         0     0%  2.03%      3.71s  2.03%  testing.(*B).launch
         0     0%  2.03%      3.71s  2.03%  testing.(*B).runN

$ go tool pprof -top -focus='treeIndex.*Range' \
  /tmp/mvcc-profile.test /tmp/index-true.mutex.pprof
File: mvcc-profile.test
Build ID: 66e63f4ace4b9a35e21538a81f97947da88de2ec
Type: delay
Time: 2026-11-02 00:55:09 UTC
Active filters:
   focus=treeIndex.*Range
Showing nodes accounting for 3.71s, 17.75% of 20.91s total
      flat  flat%   sum%        cum   cum%
     3.71s 17.75% 17.75%      3.71s 17.75%  sync.(*RWMutex).RUnlock
         0     0% 17.75%      3.71s 17.75%  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Range
         0     0% 17.75%      3.71s 17.75%  go.etcd.io/etcd/server/v3/storage/mvcc.benchmarkIndexPutRangeLimit.func1
         0     0% 17.75%      3.71s 17.75%  go.etcd.io/etcd/server/v3/storage/mvcc.benchmarkIndexPutWithRead.func1
         0     0% 17.75%      3.71s 17.75%  sync.(*WaitGroup).Go.func1
```

With total count enabled, Range keeps the read lock while scanning
all 100k keys, even after collecting 100 results.

In this run, 1001 Puts took about 3.72s. The block profile shows about
3.71s waiting for the write lock. The mutex profile reports the same
delay under Range's RUnlock, where the reader releases the lock.

This shows that Put spends most of its time waiting for Range to
finish. The delay under RUnlock is the writer's waiting time, not
CPU time spent unlocking.

```bash
$ cd server/storage/mvcc
$ go test -bench=BenchmarkIndexPut
goos: linux
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkIndexPut/Update/Keys=10000,KeyLength=32,TxnSize=1-32            3038059               375.4 ns/op         117 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=10000,KeyLength=64,TxnSize=1-32            3025593               389.4 ns/op         118 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=10000,KeyLength=128,TxnSize=1-32           2903853               397.4 ns/op         120 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=32,TxnSize=1-32           1781131               643.8 ns/op         119 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=64,TxnSize=1-32           1746964               684.4 ns/op         120 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=128,TxnSize=1-32          1581354               721.1 ns/op         120 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=32,TxnSize=1-32           798246              1694 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=64,TxnSize=1-32           799922              1567 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=128,TxnSize=1-32          788362              1629 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Create/Keys=b.N,KeyLength=64,TxnSize=1-32              1000000              1890 ns/op           146 B/op           3 allocs/op
BenchmarkIndexPut/Update/Keys=10000,KeyLength=32,TxnSize=8-32            3195176               383.2 ns/op         115 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=10000,KeyLength=64,TxnSize=8-32            3081764               400.7 ns/op         117 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=10000,KeyLength=128,TxnSize=8-32           2965419               414.5 ns/op         119 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=32,TxnSize=8-32           1960368               607.2 ns/op         114 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=64,TxnSize=8-32           1845445               660.7 ns/op         117 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=100000,KeyLength=128,TxnSize=8-32          1656636               726.3 ns/op         123 B/op           1 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=32,TxnSize=8-32           722200              1535 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=64,TxnSize=8-32           772782              1518 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Update/Keys=1000000,KeyLength=128,TxnSize=8-32          782415              1584 ns/op            96 B/op           2 allocs/op
BenchmarkIndexPut/Create/Keys=b.N,KeyLength=64,TxnSize=8-32              1000000              1904 ns/op           147 B/op           3 allocs/op
BenchmarkIndexPutTombstone/Keys=10000,KeyLength=32-32                    2717354               457.3 ns/op             0.3333 tombstones/op         158 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=10000,KeyLength=64-32                    2598055               480.0 ns/op             0.3333 tombstones/op         161 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=10000,KeyLength=128-32                   2530344               468.8 ns/op             0.3333 tombstones/op         141 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=32-32                   1759662               674.4 ns/op             0.3333 tombstones/op         139 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=32,ActiveKeys=5000-32           3827943               304.7 ns/op              0.3333 tombstones/op        143 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=64-32                           1592910               720.7 ns/op              0.3333 tombstones/op        143 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=64,ActiveKeys=5000-32           3699117               314.8 ns/op              0.3333 tombstones/op        144 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=128-32                          1478034               750.0 ns/op              0.3333 tombstones/op        146 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=100000,KeyLength=128,ActiveKeys=5000-32          3648357               323.5 ns/op              0.3333 tombstones/op        145 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=1000000,KeyLength=32-32                           866587              1586 ns/op                0.3333 tombstones/op        138 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=1000000,KeyLength=64-32                           798750              1766 ns/op                0.3333 tombstones/op        138 B/op          2 allocs/op
BenchmarkIndexPutTombstone/Keys=1000000,KeyLength=128-32                          793724              1672 ns/op                0.3333 tombstones/op        138 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=32,CountKeys=1-32                    650096              1677 ns/op            162 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=32,CountKeys=10-32                   574464              1809 ns/op            167 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=32,CountKeys=1000-32                  25088             46961 ns/op            159 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=64,CountKeys=1-32                    714806              1748 ns/op            164 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=64,CountKeys=10-32                   723198              1668 ns/op            167 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=64,CountKeys=1000-32                  23706             51139 ns/op            159 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=128,CountKeys=1-32                   595490              1838 ns/op            165 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=128,CountKeys=10-32                  524398              2055 ns/op            170 B/op          2 allocs/op
BenchmarkIndexPutCount/Keys=100000,KeyLength=128,CountKeys=1000-32                 22436             55151 ns/op            159 B/op          2 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=32,Limit=100,WithTotalCount=true-32                266         4398700 ns/op    17821 B/op         34 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=32,Limit=100,WithTotalCount=false-32             86706           13151 ns/op    17884 B/op         34 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=64,Limit=100,WithTotalCount=true-32                262         4386391 ns/op    17820 B/op         34 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=64,Limit=100,WithTotalCount=false-32             90262           11909 ns/op    17886 B/op         34 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=128,Limit=100,WithTotalCount=true-32               267         4311869 ns/op    17288 B/op         33 allocs/op
BenchmarkIndexPutRangeLimit/Keys=100000,KeyLength=128,Limit=100,WithTotalCount=false-32            86095           13699 ns/op    17866 B/op         34 allocs/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  174.973s
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-11-04 09:54:26 -05:00
Benjamin Wang f84a4e1bda Define alarmStore as an atomic pointer to avoid race condition
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2026-11-03 10:50:22 +00:00
Fu Wei a2e3642bcd Merge pull request #22655 from AliasJeff/fix-22646-force-new-cluster-backend-ahead
etcdserver: prevent the adjusted commit-index from exceeding the last index on force-new-cluster
2026-11-02 08:46:23 -05:00
AliasJeff 099de8cf3e prevent the adjusted commit-index from exceeding the last index on force-new-cluster
Signed-off-by: AliasJeff <zhexunchen@gmail.com>
2026-10-31 11:08:33 +08:00
Wei Fu 9d1f6c35e8 mvcc: disable logger in benchmark testing
It's to reduce noise and easy to review the result.

```bash
goos: linux
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkIndexCompact1-32                       10366857               115.5 ns/op           128 B/op          3 allocs/op
BenchmarkIndexCompact100-32                       103990             11519 ns/op            6773 B/op         12 allocs/op
BenchmarkIndexCompact10000-32                       3482            593618 ns/op          143567 B/op         26 allocs/op
BenchmarkIndexCompact100000-32                       259           4790154 ns/op           11272 B/op         13 allocs/op
BenchmarkIndexCompact1000000-32                      100         162676406 ns/op            4221 B/op         10 allocs/op
BenchmarkIndexPut-32                             1000000              1888 ns/op             146 B/op          3 allocs/op
BenchmarkIndexGet-32                             1000000              1582 ns/op              63 B/op          0 allocs/op
BenchmarkStorePut-32                              241468              6354 ns/op            1902 B/op         22 allocs/op
BenchmarkStoreRangeKey1-32                        683412              1523 ns/op            1032 B/op         18 allocs/op
BenchmarkStoreRangeKey100-32                       15320             79408 ns/op           43256 B/op        719 allocs/op
BenchmarkConsistentIndex-32                     27441943                96.21 ns/op           21 B/op          0 allocs/op
BenchmarkStorePutUpdate-32                        105345             10307 ns/op            3410 B/op         21 allocs/op
BenchmarkStoreTxnPut-32                           210936              6384 ns/op            1898 B/op         22 allocs/op
BenchmarkStoreRestoreRevs1-32                     620419              2712 ns/op             666 B/op          7 allocs/op
BenchmarkStoreRestoreRevs10-32                    234823              5349 ns/op            5788 B/op         47 allocs/op
BenchmarkStoreRestoreRevs20-32                    115778             10116 ns/op           11463 B/op         88 allocs/op
BenchmarkWatchableStorePut-32                     208736              6401 ns/op            2038 B/op         25 allocs/op
BenchmarkWatchableStoreTxnPut-32                  210836              6425 ns/op            2038 B/op         25 allocs/op
BenchmarkWatchableStoreWatchPutSync-32            401247              3067 ns/op             340 B/op          3 allocs/op
BenchmarkWatchableStoreWatchPutUnsync-32          241456              4162 ns/op             494 B/op          3 allocs/op
BenchmarkWatchableStoreUnsyncedCancel-32         1000000              1874 ns/op               0 B/op          0 allocs/op
BenchmarkWatchableStoreSyncedCancel-32                 1        1056220455 ns/op            4424 B/op         10 allocs/op
BenchmarkKVWatcherMemoryUsage-32                  548923              2906 ns/op             722 B/op          9 allocs/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  123.700s
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-10-30 20:24:59 +00:00
dependabot[bot] f349ec8a84 build(deps): bump github.com/prometheus/common from 0.72.0 to 0.72.1
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.72.0 to 0.72.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.72.0...v0.72.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.72.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-26 17:33:10 +00:00
Ivan Valdes 4bb13c66bd dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.31.0 to 2.32.0
Reference: https://github.com/etcd-io/etcd/pull/22624

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-10-21 22:07:22 -07:00
Ivan Valdes 9e65b5fbbd dependency: bump github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus from 1.1.0 to 1.1.1
Reference https://github.com/etcd-io/etcd/pull/22579

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-10-21 21:42:02 -07:00
Ivan Valdes a3936fd788 dependency: bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0
Reference: https://github.com/etcd-io/etcd/pull/22578

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-10-21 21:39:27 -07:00
Benjamin Wang bf9cadf044 Merge pull request #22629 from Batianxieshen1/bump-go-1.27.3
Build with Go 1.27.3
2026-10-21 14:08:20 +01:00
Fu Wei 7ff040cb84 Merge pull request #22609 from shubham3-ucb/mvcc-hash-restore-race
mvcc: fix data race between Hash and Restore
2026-10-20 19:33:03 -04:00
Batianxieshen1 f2b854dc79 Build with Go 1.27.3
Go 1.27.3 was released and contains a fix for CVE-2026-111943. Per the
project's dependency management guidance we track the latest patch release,
so bump the toolchain directive in every module and the .go-version file
from 1.27.2 to 1.27.3.

This covers the `main` branch item of #22628.

Signed-off-by: Batianxieshen1 <280706568+Batianxieshen1@users.noreply.github.com>
2026-10-20 15:39:59 +08:00
shubham3-ucb afd94a12c5 mvcc: fix data race between Hash and Restore
Signed-off-by: shubham3-ucb <shubham3@berkeley.edu>
2026-10-17 19:56:33 +00:00
Ričardas Čubukinas 01a80f67b1 etcdserver: keep Ready message order in processMessages
processMessages walks Ready messages last to first so it can keep only the newest MsgAppResp. Since #21810 and #21778 it appends survivors during that walk, so MsgApp leaves the leader in reverse log order. Followers reject those appends and the leader resends.

Keep the same filter and return survivors in Ready order, without modifying the Ready messages. TestProcessMessagesOrder now expects the same order as release-3.6.

Fixes #22483

Signed-off-by: Ričardas Čubukinas <29689012+xadips@users.noreply.github.com>
2026-10-17 18:00:37 +03:00
Benjamin Wang bbe743d12c Merge pull request #22599 from xadips/etcdserver-process-messages-order-test
etcdserver: add test for processMessages output order
2026-10-16 16:14:36 +01:00
Ričardas Čubukinas 22fa99668f etcdserver: add test for processMessages output order
Record the order in which processMessages returns Ready messages. It is currently reversed relative to the Ready order.

Part of #22483

Signed-off-by: Ričardas Čubukinas <29689012+xadips@users.noreply.github.com>
2026-10-16 14:59:26 +03:00
Jefftree 9acc0ebe37 etcdserver: fix data race in keys-only RangeStream
Clone the last key before appending \x00 so concurrent keys-only streams do not modify the shared key in the index.

Signed-off-by: Jefftree <jeffrey.ying86@live.com>
2026-10-15 18:36:28 +00:00
Ivan Valdes 5b8902209b dependency: bump golang.org/x/net from 0.59.0 to 0.61.0
Bumps golang.org/x/sys from 0.48.0 to 0.49.0, golang.org/x/sync from
0.23.0 to 0.24.0, and golang.org/x/tools from 0.50.0 to 0.51.0 as well.

References:
- https://github.com/etcd-io/etcd/pull/22567
- https://github.com/etcd-io/etcd/pull/22568
- https://github.com/etcd-io/etcd/pull/22569
- https://github.com/etcd-io/etcd/pull/22571

Signed-off-by: Ivan Valdes <ivan@vald.es>
2026-10-12 16:04:41 -07:00
Benjamin Wang 88235ecd0c Merge pull request #22553 from charankooram/bump-go-1.27.2
Bump Go to 1.27.2 on main branch
2026-10-12 13:53:33 +01:00
Venkat KooramandCopilot App 2fa0857bb3 Bump Go to 1.27.2
Part of #22549.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Venkat Kooram <charan.kooram@gmail.com>
2026-10-09 19:14:03 +00:00
Stephen Kitt 31beae919d Bump to otel semconv v1.43.0
This aligns with the version used by default in otel.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-08 18:18:46 +02:00
Stephen Kitt ba4e7918cd Bump otelgrpc to v0.72.0
See
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.47.0
for details; this is part of the v1.47.0 bump but was missed.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-08 18:18:45 +02:00
Benjamin Wang d48cfee108 Merge pull request #22546 from ivanvc/20261005-dependency-bump
[2026-10-05] dependency bump
2026-10-08 10:23:27 +01:00
Benjamin Wang b8a2441714 Merge pull request #22459 from Aadeen/refactor-raft-test-select
test(etcdserver): replace single-case select with direct channel receive
2026-10-08 10:07:45 +01:00