Skip to content

Commit 3bb81f3

Browse files
committed
storelivenss: update storeliveness/doc.go with heartbeat smearing info
`storeliveness/doc.go` is outdated with respect to heartbeat smearing changes. In particular, the `Transport` section doesn't have information about heartbeat smearing. Additionally, the `Configuration` section didn't detail the heartbeat smearing cluster setting `kv.store_liveness.heartbeat_smearing.enabled`. Added a dedicated bullet point in the `Transport` section (`5.2`) that explicitly describes heartbeat smearing as a feature to avoid goroutine spikes. Also updated the `Configuration` section (`5.3`) to detail that `kv.store_liveness.heartbeat_smearing.enabled` is available, and describes the behaviour of heartbeat sends when the cluster setting is enabled or disabled. Informs: #156830 Release note: None
1 parent 9510b99 commit 3bb81f3

File tree

1 file changed

+16
-0
lines changed
  • pkg/kv/kvserver/storeliveness

1 file changed

+16
-0
lines changed

pkg/kv/kvserver/storeliveness/doc.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@
205205
// process is also aided by synchronizing the sending of heartbeats across all
206206
// stores on a given node.
207207
//
208+
// - Heartbeat smearing (enabled by default). The sending of heartbeats across
209+
// all nodes is synchronized and paced to avoid goroutine spikes. See
210+
// Configuration section for more details.
211+
//
208212
// 5.3. Configuration
209213
//
210214
// Store liveness can be enabled/disabled using the `kv.store_liveness.enabled`
@@ -213,6 +217,18 @@
213217
// well as calls to `SupportFor` and `SupportFrom`. This is required for
214218
// correctness.
215219
//
220+
// The behaviour of heartbeat sends is governed by the
221+
// `kv.store_liveness.heartbeat_smearing.enabled` cluster setting (enabled by
222+
// default). When enabled, heartbeat sends are distributed over a certain
223+
// duration heartbeat (configured via the
224+
// `kv.store_liveness.heartbeat_smearing.refresh` cluster setting), with
225+
// messages being sent at a certain interval (configured via the
226+
// `kv.store_liveness.heartbeat_smearing.smear` cluster setting) to avoid
227+
// spiking the number of runnable goroutines (the per-node send queue
228+
// processors, and the per-node gRPC connections). When disabled, heartbeat
229+
// sends are sent immediately upon enqueueing, bypassing the smearing mechanism.
230+
// Note: the smearing applies to both heartbeat responses and requests.
231+
//
216232
// Additionally, `config.go` defines tunable configuration parameters for the
217233
// various timeouts and intervals that store liveness uses. Other intervals
218234
// (like support duration and heartbeat interval) are defined in

0 commit comments

Comments
 (0)