837 Commits

Author SHA1 Message Date
Ivan Valdes
f20bbadd40
version: bump up to 3.5.16 2024-09-10 11:20:45 -07:00
Lucas Rodriguez
64a19e4b6e Backport TestLessorRenewExtendPileup race condition fix for release-3.5
Signed-off-by: Lucas Rodriguez <lucas.rodriguez9616@gmail.com>
2024-09-09 12:50:35 -05:00
Ivan Valdes
f29ddb83fd
Bump go toolchain to 1.22.7
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-09-05 13:48:38 -07:00
AlexStocks
0263597ba8 Introduce compaction sleep interval flag
This is a backporting cherry-pick of the following commits:

- add flagsline

Signed-off-by: Jalin Wang <JalinWang@outlook.com>

- etcdserver: rename defaultCompactionSleepInterval var (#18495)

etcdserver: rename `minimumBatchInterval`  to `defaultCompactionSleepInterval` and `defaultCompactBatchLimit` to `defaultCompactionBatchLimit`

Signed-off-by: Jalin Wang <JalinWang@outlook.com>
(cherry picked from commit 2c53be7c5d91e9b618342d63d2d06c3b265abee4)

- test: add CompactionSleepInterval in FakeStore's config

After setting the ComparionSleepInterval, we can use time.Ticker
instead of time.After to optimize the scheduleComparison(),
otherwise it will fail in the 'TestStoreCompact(t)' test.

Signed-off-by: guozhao <guozhao@360.cn>
(cherry picked from commit fab8474ef8370a089fe0174e28c197b5b93898df)

- add sleep interval

(cherry picked from commit 184b0e5d4964f1115590acec50fa5e584a2f7770)
Signed-off-by: Jalin Wang <JalinWang@outlook.com>
2024-08-30 10:04:47 +08:00
akshaym-3255
b7548ca22f bump bbolt to 1.3.11 for 3.5
Signed-off-by: akshaym-3255 <mohiteakshay2020@gmail.com>

bump bbolt to 1.3.11 for 3.5
2024-08-24 02:07:36 +05:30
Wei Fu
8d98510e1a *: keep tombstone if revision == compactAtRev
Before this patch, the tombstone can be deleted if its revision is equal
compacted revision. It causes that the watch subscriber won't get this
DELETE event. Based on Compact API[1], we should keep tombstone revision
if it's not less than the compaction revision.

> CompactionRequest compacts the key-value store up to a given revision.
> All superseded keys with a revision less than the compaction revision
> will be removed.

[1]: https://etcd.io/docs/latest/dev-guide/api_reference_v3/

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit bbdc94181a6d67904b575ad936c20d1be10e220c)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-20 18:55:25 +08:00
Wei Fu
15e8a7e32c mvcc/*_test.go: should not use duplicate revision.Main for one key
Backport of #18321

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-18 20:54:39 +08:00
Chun-Hung Tseng
f9907859e5 Bump go toolchain to 1.22.6
Reference:
- https://github.com/etcd-io/etcd/issues/18443

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-08-14 23:55:33 +02:00
Benjamin Wang
184168a749 Skip leadership check if the etcd instance is active processing heartbeats
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-08-14 15:36:17 +01:00
Chun-Hung Tseng
8748e5199d
[release-3.5] go version bump from 1.21.12 to 1.21.13
Reference: https://github.com/etcd-io/etcd/issues/18419
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-08-08 21:30:30 +02:00
Marek Siarkowicz
1a18275a2d Upgrade gofail to v0.2.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-08-02 09:32:37 +02:00
Wenjia Zhang
9a5533382d version: bump up to 3.5.15 2024-07-19 20:13:00 +00:00
James Blair
d6479db0ef
Merge pull request #18289 from jmhbnz/backport-enforce-listen-metrics-tls-info
[3.5] Backport fix(server/embed) enforce non-empty client TLS if scheme is https/unixs
2024-07-16 15:10:55 +12:00
Benjamin Wang
12854ec00d Differentiate the warning message for rejected client and peer connections
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-07-14 08:50:54 +01:00
James Blair
c6b0b55847
Backport: fix(server/embed): enforce non-empty client TLS if scheme is https/unixs
Backports a657f06, 22f20a8, 497f1a4 and 3e86af6 from #18186.

Also backports required test util elements of 4c77726 from #17661.

Signed-off-by: James Blair <mail@jamesblair.net>
2024-07-09 21:09:23 +12:00
Benjamin Wang
f2b966216c
Merge pull request #18265 from k8s-infra-cherrypick-robot/cherry-pick-18245-to-release-3.5
[3.5] Suppress noisy basic auth token deletion log
2024-07-03 10:16:12 +01:00
D Tripp
e2c6c4754a Bump Go version to 1.21.12: GO-2024-2963 fix
Signed-off-by: D Tripp <38776199+thedtripp@users.noreply.github.com>
2024-07-03 05:17:11 +00:00
Ahmet Alp Balkan
0a960a272d Suppress noisy basic auth token deletion log
Right now the basic auth tokens that are deleted after `--auth-token-ttl`
cause info-level logs to be emitted. Change this to debug. This helps with
the issue at #18244 where calling `/readyz` frequently pollutes the etcd server
logs with this log message.

Fixes #18244.

Signed-off-by: Ahmet Alp Balkan <ahmet@linkedin.com>
2024-07-02 18:07:09 +00:00
Benjamin Wang
f7ab198fb6
Merge pull request #18160 from lhy1024/pick-cn
[3.5] Support multiple values for allowed client and peer TLS identities
2024-06-21 06:45:08 +01:00
Benjamin Wang
5b25d6b5a5
Merge pull request #18174 from andyxning/automated-cherry-pick-of-#18164-origin-release-3.5
bugfix: register of walWriteSec
2024-06-15 06:23:34 +01:00
Chun-Hung Tseng
26769754ad
dependency: bump golang.org/x/net from 0.17.0 to 0.23.0
Extracted log from govulncheck, suggesting that we should bump the
version of golang.org/x/net

=== Symbol Results ===

Vulnerability #1: GO-2024-2687
    HTTP/2 CONTINUATION flood in net/http
  More info: https://pkg.go.dev/vuln/GO-2024-2687
  Module: golang.org/x/net
    Found in: golang.org/x/net@v0.17.0
    Fixed in: golang.org/x/net@v0.23.0

Reference:
- https://github.com/etcd-io/etcd/pull/17708

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-06-14 11:33:21 +02:00
Andy Xie
b9ae5ef638 bugfix: register of walWriteSec
Signed-off-by: Andy Xie <andy.xning@gmail.com>
2024-06-14 09:37:21 +08:00
lhy1024
f8befd94f6 Support multiple values for allowed client and peer TLS identities(#18015)
Signed-off-by: lhy1024 <admin@liudos.us>
2024-06-13 14:32:24 +08:00
Benjamin Wang
b00646cb6e print error log when validation on conf change failed
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-06-06 19:28:59 +01:00
ArkaSaha30
a64ddefe00
Bump Go version to 1.21.11: CVE 2024-24790 fix
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2024-06-05 13:48:25 +05:30
James Blair
bf51a53a7e
version: bump up to 3.5.14 2024-05-30 06:33:09 +12:00
Seena Fallah
8bc3271af4
config: support AllowedCN and AllowedHostname through config file
Allow setting AllowedCN and AllowedHostname tls fields through config file for peer transport security.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2024-05-23 23:37:11 +05:30
Madhav Jivrajani
474031588a .*: sync go toolchain version and add ability to verify versions
This commit adds a script to sync the version present in .go-version
across all go.mod files as the toolchain directive. As part of that,
this commit also modifies go.mod files that did not have synced toolchain
directives.

Additionally, this also adds a script to verify all toolchain and go
directives against the version present in .go-version as follows:
(1) The go directive <= version in .go-version
(2) The toolchain directive == version in .go-version

This script runs as part of the `make verify` target, making it run
as a presbumit by default.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2024-05-16 14:45:42 +05:30
Ivan Valdes
9e1dadd748
etcdutl: Fix snapshot restore memory alloc issue
When running the snapshot command, allow receiving an initial memory map
allocation for the database, avoiding future memory allocation issues.

Backports commit: be2883321240340479f9e334bc4a3b2959ad7639 / PR: #17277

Co-authored-by: Fatih USTA <fatihusta86@gmail.com>
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-05-09 21:41:23 -04:00
Ivan Valdes
6abc349dc9
server: Implement WithMmapSize option for backend config
Accept a third argument for NewDefaultBackend for overrides to the
BackendConfig.
Add a new function, WithMmapSize, which modifies the backend config to
provide a custom InitiamMmapSize.

Backports commit: d69adf45f9e95661966204460f019b8164aaef12 / PR: #17277

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-05-09 21:41:16 -04:00
Marek Siarkowicz
0f0af63eaa
Merge pull request #17914 from tjungblu/backport_35_grpc_defragserv
[3.5] gRPC health server sets serving status to NOT_SERVING on defrag
2024-05-07 09:14:05 +02:00
Thomas Jungblut
a5eec4d78d Bump bbolt to 1.3.10 for 3.5
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-05-06 12:02:49 +02:00
Thomas Jungblut
cee181d1ab v3rpc: run health notifier to listen on online defrag state change
Backport from 3.6 in #16836

Co-authored-by: Chao Chen <chaochn@amazon.com>
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-05-06 10:03:08 +02:00
Thomas Jungblut
750bc0b1e4 gRPC health server sets serving status to NOT_SERVING on defrag
gRPC health server sets serving status to NOT_SERVING on defrag
Backport from 3.6 in #16278

Co-authored-by: Chao Chen <chaochn@amazon.com>
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2024-04-30 15:09:51 +02:00
Wei Fu
0af22abc6c server/mvcc: should update currentRev in revMu
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-24 12:28:20 +08:00
Wei Fu
c06b17b9ff server/storage: update currentRev if scheduledCompact > currentRev
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 9ea234913a99670d18b66aa23915781f89713177)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-24 12:25:19 +08:00
Wei Fu
6b034466aa server/mvcc: introduce compactBeforeSetFinishedCompact failpoint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-24 12:14:27 +08:00
Benjamin Wang
adf1c3f291 Update the compaction log when bootstrap and update compact's signature
Actually the compact() never return an error, so remove the second return
parameter.

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-04-21 13:17:07 +01:00
Marek Siarkowicz
91e9dd33e4
Merge pull request #17808 from siyuanfoundation/3.5-downgrade-test
[3.5] add experimental-snapshot-catchup-entries flag
2024-04-19 08:31:13 +02:00
Siyuan Zhang
c391d69b08 test: add checking snapshot be sent in mix_version_test.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-04-18 19:08:05 +00:00
Chun-Hung Tseng
9331ee32e1
[backport-3.5] server: ignore raft messages if member id mismatch #17078
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
2024-04-17 13:50:23 +02:00
Siyuan Zhang
464df4a979 add experimental-snapshot-catchup-entries flag.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-04-15 17:04:44 -07:00
Benjamin Wang
b671991c9b
Merge pull request #17616 from Akiqqqqqqq/feature-wal-write-metrics
[3.5] feat: add wal write system call metrics observation
2024-04-08 08:26:44 +01:00
Qiuyu Wu
51f3134355 feat: observe wal write at one time
Signed-off-by: Qiuyu Wu <qiuyu.wu@shopee.com>
2024-04-06 22:58:32 +08:00
Wei Fu
94a1d0c1b5 *: LeaseTimeToLive returns error if leader changed
The old leader demotes lessor and all the leases' expire time will be
updated. Instead of returning incorrect remaining TTL, we should return
errors to force client retry.

Cherry-pick: d3bb6f688b4643155b4a9924cec726bdc76a1306

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-04-04 22:33:05 +08:00
James Blair
c9063a0dcd
version: bump up to 3.5.13 2024-03-30 07:27:31 +13:00
Chao Chen
46d2caae1e [release-3.5] backport fix watch event loss after compaction
Signed-off-by: Chao Chen <chaochn@amazon.com>
2024-03-18 18:41:17 -07:00
Marek Siarkowicz
579b22cf3a Fix progress notification for watch that doesn't get any events
When implementing the fix for progress notifications
(https://github.com/etcd-io/etcd/pull/15237) we made a incorrect
assumption that that unsynched watches will always get at least one event.

Unsynched watches include not only slow watchers, but also newly created
watches that requested current or older revision. In case that non of the events
match watch filter, those newly created watches might become synched
without any event going through.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-03-11 20:18:26 +01:00
Ivan Valdes
e6d95c8457
dependency: bump google.golang.org/protobuf to v1.33.0
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-03-07 16:03:12 -08:00
Benjamin Wang
d76d8479ee Bump bbolt to 1.3.9 for 3.5
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-02-24 15:38:49 +00:00