diff --git a/0011-backport-Fix-wait-time-docs-tests-to-indicate-trigger-deadline.patch b/0011-backport-Fix-wait-time-docs-tests-to-indicate-trigger-deadline.patch new file mode 100644 index 0000000000000000000000000000000000000000..f94e2a83607b71e063ac50dfed766fb8ca290479 --- /dev/null +++ b/0011-backport-Fix-wait-time-docs-tests-to-indicate-trigger-deadline.patch @@ -0,0 +1,61 @@ +From 5f782c350f84f3f0e1386cb2d539a509a41336f7 Mon Sep 17 00:00:00 2001 +From: redwrasse +Date: Sat, 27 Jul 2024 21:41:40 +0000 +Subject: [PATCH] fix wait_time docs, tests for trigger deadline greater than + or equal to wait deadline + +Signed-off-by: redwrasse + +--- + pkg/wait/wait_time.go | 4 ++-- + pkg/wait/wait_time_test.go | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/pkg/wait/wait_time.go b/pkg/wait/wait_time.go +index 297e48a..1317889 100644 +--- a/pkg/wait/wait_time.go ++++ b/pkg/wait/wait_time.go +@@ -19,9 +19,9 @@ import "sync" + type WaitTime interface { + // Wait returns a chan that waits on the given logical deadline. + // The chan will be triggered when Trigger is called with a +- // deadline that is later than the one it is waiting for. ++ // deadline that is later than or equal to the one it is waiting for. + Wait(deadline uint64) <-chan struct{} +- // Trigger triggers all the waiting chans with an earlier logical deadline. ++ // Trigger triggers all the waiting chans with an equal or earlier logical deadline. + Trigger(deadline uint64) + } + +diff --git a/pkg/wait/wait_time_test.go b/pkg/wait/wait_time_test.go +index 26164c4..2047558 100644 +--- a/pkg/wait/wait_time_test.go ++++ b/pkg/wait/wait_time_test.go +@@ -54,10 +54,10 @@ func TestWaitTime(t *testing.T) { + func TestWaitTestStress(t *testing.T) { + chs := make([]<-chan struct{}, 0) + wt := NewTimeList() +- for i := 0; i < 10000; i++ { ++ for i := 0; i <= 10000; i++ { + chs = append(chs, wt.Wait(uint64(i))) + } +- wt.Trigger(10000 + 1) ++ wt.Trigger(10000) + + for _, ch := range chs { + select { +@@ -78,9 +78,9 @@ func BenchmarkWaitTime(b *testing.B) { + func BenchmarkTriggerAnd10KWaitTime(b *testing.B) { + for i := 0; i < b.N; i++ { + wt := NewTimeList() +- for j := 0; j < 10000; j++ { ++ for j := 0; j <= 10000; j++ { + wt.Wait(uint64(j)) + } +- wt.Trigger(10000 + 1) ++ wt.Trigger(10000) + } + } +-- +2.9.3.windows.1 + diff --git a/etcd.spec b/etcd.spec index c33a6f8f498c1e7f47c7cf35d5827be5c033cf7e..4007b93a78a9640aa758716c3d1ff1245b0e7353 100644 --- a/etcd.spec +++ b/etcd.spec @@ -31,7 +31,7 @@ system.} %global gosupfiles integration/fixtures/* etcdserver/api/v2http/testdata/* Name: etcd -Release: 13 +Release: 14 Summary: Distributed reliable key-value store for the most critical data of a distributed system # Upstream license specification: Apache-2.0 @@ -54,6 +54,7 @@ Patch7: 0007-fix-CVE-2022-34038.patch Patch8: 0008-fix-CVE-2023-32082.patch Patch9: 0009-fix-CVE-2021-28235.patch Patch10: 0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch +Patch11: 0011-backport-Fix-wait-time-docs-tests-to-indicate-trigger-deadline.patch BuildRequires: golang BuildRequires: python3-devel @@ -78,6 +79,7 @@ Requires(pre): shadow-utils %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %ifarch sw_64 %patch3 -p1 %endif @@ -166,6 +168,10 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/ %endif %changelog +* Tue Sep 3 2024 guojunding - 3.4.14-14 +- Fix wait_time docs, tests for trigger deadline greater than +- or equal to wait deadline + * Fri Jul 5 2024 guojunding - 3.4.14-13 - Suppress noisy basic auth token deletion log