Skip to content

Commit 4888ee0

Browse files
author
CloudNativePG Automated Updates
committed
chore: sync API
1 parent ed20397 commit 4888ee0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

pkg/api/v1/cluster_types.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ type PrimaryLeaseConfiguration struct {
565565

566566
// How frequently, in seconds, a non-holder instance retries acquiring or
567567
// renewing the lease.
568-
// Defaults to 5.
569-
// +kubebuilder:default:=5
568+
// Defaults to 2.
569+
// +kubebuilder:default:=2
570570
// +kubebuilder:validation:Minimum=1
571571
// +optional
572572
RetryPeriodSeconds *int32 `json:"retryPeriodSeconds,omitempty"`
@@ -1469,8 +1469,11 @@ const (
14691469
DefaultPrimaryLeaseRenewDeadlineSeconds = 10
14701470

14711471
// DefaultPrimaryLeaseRetryPeriodSeconds is the default interval, in seconds, between lease
1472-
// acquisition or renewal attempts.
1473-
DefaultPrimaryLeaseRetryPeriodSeconds = 5
1472+
// acquisition or renewal attempts. It matches the conventional Kubernetes leader-election
1473+
// retry period: a smaller value lets a candidate detect a cleanly released lease sooner
1474+
// (faster switchover) without affecting the take-over wait that holds back a premature
1475+
// promotion, which is governed by the lease duration.
1476+
DefaultPrimaryLeaseRetryPeriodSeconds = 2
14741477

14751478
// DefaultPrimaryLeaseReleasedDurationSeconds is the default TTL, in seconds, written when the
14761479
// primary explicitly releases its lease on a clean shutdown.

0 commit comments

Comments
 (0)