Skip to content

Commit

Permalink
Document HEARTBEAT_FREQUENCY and MAX_MISSED_HEARTBEATS (elastic#108794)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiannaHohensee authored May 22, 2024
1 parent 49ff04b commit 1cf38d3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,22 @@
import java.util.function.Consumer;

public class StoreHeartbeatService implements LeaderHeartbeatService {
/**
* How frequently the master will write a heartbeat to the blob store. Indicates that the master node is still alive, preventing other
* nodes from running for election.
*/
public static final Setting<TimeValue> HEARTBEAT_FREQUENCY = Setting.timeSetting(
"cluster.stateless.heartbeat_frequency",
TimeValue.timeValueSeconds(15),
TimeValue.timeValueSeconds(1),
Setting.Property.NodeScope
);

/**
* Multiplied against HEARTBEAT_FREQUENCY to determine how long to wait for the last master heartbeat to fade before a node can run for
* election. Defaults to 2, for a waiting period of 2x the HEARTBEAT_FREQUENCY. Reducing to 1 may get pretty racy with the heartbeat
* frequency, and isn't advised.
*/
public static final Setting<Integer> MAX_MISSED_HEARTBEATS = Setting.intSetting(
"cluster.stateless.max_missed_heartbeats",
2,
Expand Down

0 comments on commit 1cf38d3

Please sign in to comment.