52ea2f83c5
Use constructor in tests
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-12-01 21:02:48 +01:00
093df6f4d2
Fix gofump error due to merge race
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-12-01 20:03:34 +01:00
46127e7ea5
Merge pull request #18961 from ArkaSaha30/deps_mgmt_25_11_24
...
[2024-11-25] Manual Dependency Bump
2024-11-29 20:09:47 -07:00
4989834049
Use assert in TestSnapshot tests
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 20:49:55 +01:00
6cebf973a1
Run a separate in memory snapshot to reduce number of entries stored in raft memory storage
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 20:40:02 +01:00
cfe958de6a
Cleanup triggerSnapshot function and rename it to snapshotIfNeededAndCompactRaftLog
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 20:39:09 +01:00
d907ecdffd
Separate memory and disk snapshot indexes
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 20:39:07 +01:00
9d55044494
Move updating snapshot index just after we safe snapshot to disk
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 20:38:20 +01:00
152973425a
Rename snapshot variables to explicitly mention using disk
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-29 14:18:31 +01:00
4cce12a724
Fix genproto annotations
...
* Please add etcd_version annotation in *.proto file with next etcd version
* Run ./scripts/genproto.sh
push_pin
* Run ./scripts/update_proto_annotations.sh
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-29 16:39:53 +05:30
8f91eb1627
Merge pull request #18954 from mmorel-35/gofumpt/server
...
fix: enable gofumpt instead of gofmt linter in server
2024-11-29 09:24:38 +00:00
527c1337e3
dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.23.0 to 2.24.0
...
This commit will bump dependency github.com/grpc-ecosystem/grpc-gateway/v2 from 2.23.0 to 2.24.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-29 14:46:03 +05:30
6fd6bd812f
dependency: bump github.com/stretchr/testify from 1.9.0 to 1.10.0
...
This commit will bump dependency github.com/stretchr/testify from 1.9.0 to 1.10.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-29 12:38:16 +05:30
b0f8da5768
Merge pull request #17008 from serathius/translate-v2-v3
...
Translate v2 requests into v3 ClusterMemberAttrSetRequest and ClusterVersionSetRequest
2024-11-28 11:48:11 +01:00
69efe31ea0
fix: enable gofumpt instead of gofmt linter in server
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-11-27 07:22:36 +01:00
7961fb33c5
dependency: bump go.etcd.io/raft/v3 v3.6.0-beta.0
...
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-23 14:39:21 +05:30
f77fa903cb
Merge pull request #17757 from fuweid/should-fatal-if-panic
...
storage/backend: fatal if there is panic during defrag
2024-11-22 23:38:45 +01:00
880d5ada5f
dependency: bump google.golang.org/protobuf from 1.35.1 to 1.35.2
...
This commit will bump dependency google.golang.org/protobuf from 1.35.1 to 1.35.2
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-21 11:19:16 +05:30
8f2153097b
dependency: bump golang.org/x/net from 0.30.0 to 0.31.0
...
dependency: bump golang.org/x/net from 0.30.0 to 0.31.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-21 11:15:43 +05:30
f8cfb43ba8
dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.56.0 to 0.57.0
...
This commit will bump dependency go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.56.0 to 0.57.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-21 10:58:51 +05:30
6b8198e85e
dependency: bump golang.org/x/crypto from 0.28.0 to 0.29.0
...
This commit will bump dependency golang.org/x/crypto from 0.28.0 to 0.29.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-21 10:53:48 +05:30
e1b4ffb969
Merge pull request #18889 from ArkaSaha30/deps_mgmt_11_11_24
...
[2024-11-11] Manual Dependency Bump
2024-11-14 21:28:56 +00:00
e67a4cdceb
dependency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace from 1.31.0 to 1.32.0
...
This commit will bump dependency go.opentelemetry.io/otel/exporters/otlp/otlptrace from 1.31.0 to 1.32.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-14 14:27:11 +05:30
790994b927
dependency: bump google.golang.org/grpc from 1.67.1 to 1.68.0
...
This commit will bump dependency google.golang.org/grpc from 1.67.1 to 1.68.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-14 11:28:05 +05:30
04914cc97e
dependency: bump golang.org/x/sync from 0.8.0 to 0.9.0
...
This commit will bump dependency golang.org/x/sync from 0.8.0 to 0.9.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-14 11:28:05 +05:30
bc9fac7a02
dependency: bump go.opentelemetry.io/otel from 1.31.0 to 1.32.0
...
This commit will bump dependency go.opentelemetry.io/otel from 1.31.0 to 1.32.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-14 11:27:55 +05:30
eaeeebd2bb
dependency: bump golang.org/x/time from 0.7.0 to 0.8.0
...
This commit will bump dependency golang.org/x/time from 0.7.0 to 0.8.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-13 15:32:20 +05:30
617f3578be
add tls min/max version to grpc proxy
...
This adds the min and max TLS version support from #13506 and #15156 to the grpc proxy.
Fixes #13506
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com >
2024-11-12 18:08:33 +01:00
b7812513ce
Translate v2 requests into v3 ClusterMemberAttrSetRequest and ClusterVersionSetRequest
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2024-11-11 17:30:41 +01:00
97d19b6e26
build: fix govet shadow err
...
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch >
2024-11-08 12:35:42 +01:00
694ace21d5
Merge pull request #18851 from ghouscht/issue-18841
...
fix(defrag): close temp file in case of error
2024-11-07 20:12:54 +00:00
a19d4087cc
fix(defrag): close temp file in case of error
...
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch >
2024-11-07 15:18:39 +01:00
86c6b5f2da
fix: enable usestdlibvars linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-11-07 10:28:48 +00:00
b1fb361eca
Bump go toolchain to 1.23.3
...
Signed-off-by: Ivan Valdes <ivan@vald.es >
2024-11-06 17:13:26 -08:00
c438fcbafd
storage/backend: fatal if there is panic during defrag
...
We should exit as soon as possible if there is panic during defrag.
Because that tx might be closed. The inflight request might use invalid
tx and then panic as well. However, the real panic might be shadowed by
new panic. It's related to goroutine schedule. So, we should fatal here.
How to reproduce bbolt#715:
```diff
diff --git a/server/etcdserver/api/v3rpc/maintenance.go b/server/etcdserver/api/v3rpc/maintenance.go
index 4f55c7c74..0a91b4225 100644
--- a/server/etcdserver/api/v3rpc/maintenance.go
+++ b/server/etcdserver/api/v3rpc/maintenance.go
@@ -89,7 +89,13 @@ func NewMaintenanceServer(s *etcdserver.EtcdServer, healthNotifier notifier) pb.
func (ms *maintenanceServer) Defragment(ctx context.Context, sr *pb.DefragmentRequest) (*pb.DefragmentResponse, error) {
ms.lg.Info("starting defragment")
ms.healthNotifier.defragStarted()
- defer ms.healthNotifier.defragFinished()
+ defer func() {
+ ms.healthNotifier.defragFinished()
+ if rerr := recover(); rerr != nil {
+ time.Sleep(30 * time.Second)
+ panic(rerr)
+ }
+ }()
err := ms.bg.Backend().Defrag()
if err != nil {
ms.lg.Warn("failed to defragment", zap.Error(err))
```
```bash
$ make gofail-enable
$ make
$ GOFAIL_HTTP="127.0.0.1:1234" bin/etcd
$ New Terminal
$ curl http://127.0.0.1:1234/defragBeforeRename -XPUT -d'panic()'
$ bin/etcdctl defrag
$ Old Terminal
{"level":"info","ts":"2024-04-09T23:28:54.084434+0800","caller":"v3rpc/maintenance.go:90","msg":"starting defragment"}
{"level":"info","ts":"2024-04-09T23:28:54.087363+0800","caller":"backend/backend.go:509","msg":"defragmenting","path":"default.etcd/member/snap/db","current-db-size-bytes":20480,"current-db-size":"20 kB","current-db-size-in-use-bytes":16384,"current-db-size-in-use":"16 kB"}
{"level":"info","ts":"2024-04-09T23:28:54.091229+0800","caller":"v3rpc/health.go:62","msg":"grpc service status changed","service":"","status":"SERVING"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbb2553]
goroutine 156 [running]:
go.etcd.io/bbolt.(*Tx).Bucket(...)
go.etcd.io/bbolt@v1.4.0-alpha.0/tx.go:112
go.etcd.io/etcd/server/v3/storage/backend.(*baseReadTx).UnsafeRange(0xc00061ac80, {0x12b7780, 0x1a73420}, {0x1a113e8, 0xe, 0xe}, {0x0, 0x0, 0x0}, 0x1)
go.etcd.io/etcd/server/v3/storage/backend/read_tx.go:103 +0x233
go.etcd.io/etcd/server/v3/storage/schema.UnsafeReadStorageVersion({0x7f6280613618?, 0xc00061ac80?})
go.etcd.io/etcd/server/v3/storage/schema/version.go:35 +0x5d
go.etcd.io/etcd/server/v3/storage/schema.UnsafeDetectSchemaVersion(0xc000334b80, {0x7f6280613618, 0xc00061ac80})
go.etcd.io/etcd/server/v3/storage/schema/schema.go:94 +0x47
go.etcd.io/etcd/server/v3/storage/schema.DetectSchemaVersion(0xc000334b80, {0x12b77f0, 0xc00061ac80})
go.etcd.io/etcd/server/v3/storage/schema/schema.go:89 +0xf2
go.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).StorageVersion(0xc000393c08)
go.etcd.io/etcd/server/v3/etcdserver/server.go:2216 +0x105
go.etcd.io/etcd/server/v3/etcdserver.(*serverVersionAdapter).GetStorageVersion(0x0?)
go.etcd.io/etcd/server/v3/etcdserver/adapters.go:77 +0x16
go.etcd.io/etcd/server/v3/etcdserver/version.(*Monitor).UpdateStorageVersionIfNeeded(0xc00002df70)
go.etcd.io/etcd/server/v3/etcdserver/version/monitor.go:112 +0x5d
go.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).monitorStorageVersion(0xc000393c08)
go.etcd.io/etcd/server/v3/etcdserver/server.go:2259 +0xa8
go.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).GoAttach.func1()
go.etcd.io/etcd/server/v3/etcdserver/server.go:2440 +0x59
created by go.etcd.io/etcd/server/v3/etcdserver.(*EtcdServer).GoAttach in goroutine 1
go.etcd.io/etcd/server/v3/etcdserver/server.go:2438 +0xf9
```
REF: https://github.com/etcd-io/bbolt/issues/715
Signed-off-by: Wei Fu <fuweid89@gmail.com >
2024-11-06 23:56:54 +00:00
75274b24e2
Merge pull request #18840 from ArkaSaha30/deps_mgmt_4_11_24
...
[2024-11-04] Manual Dependency Bump
2024-11-06 17:30:55 +00:00
9250982e1a
Merge pull request #18822 from ghouscht/issue-18810
...
fix(defrag): handle no space left error
2024-11-06 13:00:39 +00:00
04c042ceac
fix(defrag): handle defragdb failure
...
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch >
2024-11-06 12:43:51 +01:00
35cab80e1f
fix(defrag): handle no space left error
...
Signed-off-by: Thomas Gosteli <thomas.gosteli@protonmail.ch >
2024-11-06 11:01:17 +01:00
447bec1bf3
dependency: bump go.etcd.io/bbolt from 1.4.0-alpha.1 to 1.4.0-beta.0
...
This commit will bump dependency go.etcd.io/bbolt from 1.4.0-alpha.1 to 1.4.0-beta.0
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-06 15:23:51 +05:30
f43c6815b1
dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.22.0 to 2.23.0
...
This commit will bump dependency github.com/grpc-ecosystem/grpc-gateway/v2 from 2.22.0 to 2.23.0
fixes genproto error as per: https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/dependency_management.md#troubleshooting
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-06 15:23:08 +05:30
fed92fa7ff
dependency: bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1
...
This commit will bump dependency github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com >
2024-11-05 18:11:05 +05:30
4dbc7e943f
Merge pull request #18814 from mmorel-35/testifylint/require-error
...
fix: enable require-error rule from testifylint
2024-11-03 19:57:10 +00:00
df15a7fe4c
dependency: bump github.com/prometheus/common from 0.60.0 to 0.60.1
...
Reference:
- https://github.com/etcd-io/etcd/pull/18796
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com >
2024-10-31 22:43:48 +08:00
5858a08f1b
fix: enable require-error rule from testifylint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-31 08:33:34 +01:00
6883308899
Merge pull request #18800 from mmorel-35/testifylint/require-error
...
fix: enable require-error rule from testifylint in client, pkg and server packages
2024-10-30 23:03:01 +00:00
8ec90c6088
Merge pull request #18780 from mmorel-35/server/errorlint
...
fix: enable errorlint in server directory
2024-10-30 22:55:43 +00:00
694b0fbdb6
refactor Etcdserver.snapshot to extract compaction into a separate method
...
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com >
2024-10-30 09:25:54 +00:00
3a3115122e
fix: enable require-error rule from testifylint in client, pkg and server packages
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2024-10-28 21:02:58 +01:00
5cce245df5
dependency: bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5
...
Reference:
- https://github.com/etcd-io/etcd/pull/18758
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com >
2024-10-27 12:43:19 +09:00