hashicorp / hashicorp/memberlist

docs/naming: Interval used as timeout?

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
4.1k
Forks
478
Avg merge
15h 58m
Merged PRs (30d)
3

Description

In https://github.com/hashicorp/memberlist/blob/1a62499c21db33d57691001d5e08a71ec857b18f/state.go#L270-L273

```go
// Send a ping to the node. If this node looks like it's suspect or dead,
// also tack on a suspect message so that it has a chance to refute as
// soon as possible.
deadline := sent.Add(probeInterval)
```

something called `interval` is used as a timeout, which is quite confusing.

And the docs at https://www.consul.io/docs/agent/options.html#probe_interval say:

> `probe_interval` - The interval between random node probes. Setting this lower (more frequent) will cause the cluster to detect failed nodes more quickly at the expense of increased bandwidth usage. The default is 1s.

No indication that this changes the timeout in addition to the _rate_ at which the check is done.

It gets more confusing given that there actually is a setting [`probe_timeout`](https://www.consul.io/docs/agent/options.html#probe_timeout), but that one isn't used as a timeout.

* Should the docs be improved to indicate that this "interval" actually also controls a timeout?
* Or is this a bug, and it should be `deadline := sent.Add(m.awareness.ScaleTimeout(m.config.ProbeTimeout)` instead?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.