From 275e10bcf72c03ca0884402db927c9168fc6dc3f Mon Sep 17 00:00:00 2001 From: James Blair Date: Mon, 6 Mar 2023 20:21:03 +1300 Subject: [PATCH] Return default snapshot count to 10,000. The huge (100k+) value was justified when storev2 was being dumped completely with every snapshot. With storev2 being decomissioned we can checkpoint more frequently for faster recovery. Signed-off-by: James Blair --- CHANGELOG/CHANGELOG-3.6.md | 1 + server/etcdmain/help.go | 2 +- server/etcdserver/server.go | 2 +- tests/framework/e2e/cluster.go | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG/CHANGELOG-3.6.md b/CHANGELOG/CHANGELOG-3.6.md index 93252c05903..edd0ca37b21 100644 --- a/CHANGELOG/CHANGELOG-3.6.md +++ b/CHANGELOG/CHANGELOG-3.6.md @@ -73,6 +73,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0). - Graduated [`--experimental-warning-unary-request-duration` to `--warning-unary-request-duration`](https://github.com/etcd-io/etcd/pull/14414). Note the experimental flag is deprecated and will be decommissioned in v3.7. - Add [field `hash_revision` into `HashKVResponse`](https://github.com/etcd-io/etcd/pull/14537). - Add [`etcd --experimental-snapshot-catch-up-entries`](https://github.com/etcd-io/etcd/pull/15033) flag to configure number of entries for a slow follower to catch up after compacting the the raft storage entries and defaults to 5k. +- Decreased [`--snapshot-count` default value from 100,000 to 10,000](https://github.com/etcd-io/etcd/pull/15408) ### etcd grpc-proxy diff --git a/server/etcdmain/help.go b/server/etcdmain/help.go index bc444208d48..67b67add816 100644 --- a/server/etcdmain/help.go +++ b/server/etcdmain/help.go @@ -54,7 +54,7 @@ Member: Path to the data directory. --wal-dir '' Path to the dedicated wal directory. - --snapshot-count '100000' + --snapshot-count '10000' Number of committed transactions to trigger a snapshot to disk. --heartbeat-interval '100' Time (in milliseconds) of a heartbeat interval. diff --git a/server/etcdserver/server.go b/server/etcdserver/server.go index eb07dab5548..1d9ea978498 100644 --- a/server/etcdserver/server.go +++ b/server/etcdserver/server.go @@ -74,7 +74,7 @@ import ( ) const ( - DefaultSnapshotCount = 100000 + DefaultSnapshotCount = 10000 // DefaultSnapshotCatchUpEntries is the number of entries for a slow follower // to catch-up after compacting the raft storage entries. diff --git a/tests/framework/e2e/cluster.go b/tests/framework/e2e/cluster.go index 17f992e99db..ef08e00fa00 100644 --- a/tests/framework/e2e/cluster.go +++ b/tests/framework/e2e/cluster.go @@ -148,7 +148,7 @@ type EtcdProcessClusterConfig struct { MetricsURLScheme string - SnapshotCount int // default is 100000 + SnapshotCount int // default is 10000 SnapshotCatchUpEntries int // default is 5000 Client ClientConfig