From 3da6c4fc18f216e137208e5cc8c7aa2b47297e4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E6=97=AD?= <liuxu623@gmail.com>
Date: Thu, 5 Sep 2024 13:29:05 +0800
Subject: [PATCH] Allow for configuring etcd progress notify interval and
 default set to 5s (#11499)

---
 inventory/sample/group_vars/etcd.yml | 3 +++
 roles/etcd/defaults/main.yml         | 3 +++
 roles/etcd/templates/etcd.env.j2     | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/inventory/sample/group_vars/etcd.yml b/inventory/sample/group_vars/etcd.yml
index 66bbc0d48..88d040953 100644
--- a/inventory/sample/group_vars/etcd.yml
+++ b/inventory/sample/group_vars/etcd.yml
@@ -33,3 +33,6 @@
 # etcd_experimental_distributed_tracing_sample_rate: 100
 # etcd_experimental_distributed_tracing_address: "localhost:4317"
 # etcd_experimental_distributed_tracing_service_name: etcd
+
+## The interval for etcd watch progress notify events
+# etcd_experimental_watch_progress_notify_interval: 5s
diff --git a/roles/etcd/defaults/main.yml b/roles/etcd/defaults/main.yml
index fee6903df..09ee9d600 100644
--- a/roles/etcd/defaults/main.yml
+++ b/roles/etcd/defaults/main.yml
@@ -125,3 +125,6 @@ etcd_experimental_enable_distributed_tracing: false
 etcd_experimental_distributed_tracing_sample_rate: 100
 etcd_experimental_distributed_tracing_address: "localhost:4317"
 etcd_experimental_distributed_tracing_service_name: etcd
+
+# The interval for etcd watch progress notify events
+etcd_experimental_watch_progress_notify_interval: 5s
diff --git a/roles/etcd/templates/etcd.env.j2 b/roles/etcd/templates/etcd.env.j2
index 8fd8e1e04..ec217957b 100644
--- a/roles/etcd/templates/etcd.env.j2
+++ b/roles/etcd/templates/etcd.env.j2
@@ -76,3 +76,5 @@ ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_ADDRESS={{ etcd_experimental_distributed_t
 ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_SERVICE_NAME={{ etcd_experimental_distributed_tracing_service_name }}
 ETCD_EXPERIMENTAL_DISTRIBUTED_TRACING_INSTANCE_ID={{ etcd_member_name }}
 {% endif %}
+
+ETCD_EXPERIMENTAL_WATCH_PROGRESS_NOTIFY_INTERVAL={{ etcd_experimental_watch_progress_notify_interval }}
-- 
GitLab