Skip to content

Commit

Permalink
[Opt](heartbeat) improve the tolerance of the cluster to occasional h…
Browse files Browse the repository at this point in the history
…eartbeat failures (apache#38896)

To improve the tolerance of the cluster to occasional heartbeat
failures,change max_backend_heartbeat_failure_tolerance_count from 1 to
3.
  • Loading branch information
liaoxin01 authored and dataroaring committed Aug 16, 2024
1 parent cfb3126 commit 90fde03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1923,12 +1923,12 @@ public class Config extends ConfigBase {

/**
* Maximum backend heartbeat failure tolerance count.
* Default is 1, which means if 1 heart failed, the backend will be marked as dead.
* Default is 3, which means if 3 heart failed, the backend will be marked as dead.
* A larger value can improve the tolerance of the cluster to occasional heartbeat failures.
* For example, when running regression tests, this value can be increased.
*/
@ConfField(mutable = true, masterOnly = true)
public static long max_backend_heartbeat_failure_tolerance_count = 1;
public static long max_backend_heartbeat_failure_tolerance_count = 3;

/**
* Abort transaction time after lost heartbeat.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ protected void beforeCreatingConnectContext() throws Exception {
Config.colocate_group_relocate_delay_second = -1000; // be dead will imm relocate
Config.tablet_schedule_interval_ms = 7200_000L; //disable schedule
Config.tablet_checker_interval_ms = 7200_000L; //disable checker
Config.max_backend_heartbeat_failure_tolerance_count = 1;
}

@Override
Expand Down

0 comments on commit 90fde03

Please sign in to comment.