From 18d07d2f8b1a2045e5059ded015361eca78403d0 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Thu, 17 Oct 2024 22:40:54 +0000 Subject: [PATCH] gossip: adjust recovery timings to tolerate shorter lease expiration Fixes #133159. This commit reduces the gossip sentinel TTL from 6s to 3s, so that it is no longer aligned with the node liveness expiration of 6s. The sentinel key informs gossip whether it is connected to the primary gossip network or a partition and thus needs a short TTL so that partitions are fixed quickly. In particular, partitions need to resolve faster than the timeout (6s) or node liveness will be adversely affected, which can trigger false-positives in the `ranges.unavailable` metric. This commit also reduces the gossip stall check interval from 2s to 1s. The stall check interval also affects how quickly gossip partitions are noticed and repaired, controlling how frequently gossip connection attempts are made. The stall check itself is very cheap, so this produces no load on the system. Release note (bug fix): Reduce the duration of partitions in the gossip network when a node crashes in order to eliminate false positives in the `ranges.unavailable` metric. --- pkg/sql/test_file_893.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pkg/sql/test_file_893.go diff --git a/pkg/sql/test_file_893.go b/pkg/sql/test_file_893.go new file mode 100644 index 000000000000..4f9f3acf5457 --- /dev/null +++ b/pkg/sql/test_file_893.go @@ -0,0 +1,12 @@ + + // Package sql + package sql + + // TestFunction is a sample test function created for commit 3316aaea + func TestFunction() { + // Test implementation + // Original commit SHA: 3316aaea8811f5f3445b5821b703e1b994c97011 + // Added on: 2024-12-19T23:08:40.545715 + // This is a single file change for demonstration + } + \ No newline at end of file