enhance: increase session TTL from 10s to 30s (#45228)

issue: #45227
Increase the default session TTL to 30 seconds to tolerate etcd failover
time. This prevents session expiration during etcd cluster failover,
improving system stability.

When etcd undergoes failover (leader election or node restart), the
previous 10s TTL was too short to survive the failover window, causing
unnecessary session expiration and component restarts. The new 30s TTL
provides sufficient buffer for etcd to complete failover while
maintaining session liveness.

Changes:
- Update DefaultSessionTTL constant from 10 to 30
- Update SessionTTL ParamItem DefaultValue from "10" to "30"

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2025-11-10 16:47:36 +08:00 committed by GitHub
parent 897ac983c8
commit 931d4bf95f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -988,7 +988,7 @@ common:
internaltlsEnabled: false
tlsMode: 0
session:
ttl: 10 # ttl value when session granting a lease to register service
ttl: 30 # ttl value when session granting a lease to register service
retryTimes: 30 # retry times when session sending etcd requests
locks:
metrics:

View File

@ -47,7 +47,7 @@ const (
DefaultMiddlePriorityThreadCoreCoefficient = 5
DefaultLowPriorityThreadCoreCoefficient = 1
DefaultSessionTTL = 10 // s
DefaultSessionTTL = 30 // s
DefaultSessionRetryTimes = 30
DefaultMaxDegree = 56
@ -846,7 +846,7 @@ Large numeric passwords require double quotes to avoid yaml parsing precision is
p.SessionTTL = ParamItem{
Key: "common.session.ttl",
Version: "2.0.0",
DefaultValue: "10",
DefaultValue: "30",
Doc: "ttl value when session granting a lease to register service",
Export: true,
}