Skip to content

Commit 778d0db

Browse files
Expose the rest of aten settings to rabbitmq.conf
1 parent 79f6f16 commit 778d0db

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

deps/rabbit/priv/schema/rabbit.schema

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,6 +2637,46 @@ end}.
26372637
end
26382638
}.
26392639

2640+
{mapping, "raft.adaptive_failure_detector.scaling_factor", "aten.scaling_factor", [
2641+
{datatype, float}
2642+
]}.
2643+
2644+
{translation, "aten.scaling_factor",
2645+
fun(Conf) ->
2646+
case cuttlefish:conf_get("raft.adaptive_failure_detector.scaling_factor", Conf, undefined) of
2647+
undefined -> cuttlefish:unset();
2648+
Val -> Val
2649+
end
2650+
end
2651+
}.
2652+
2653+
{mapping, "raft.adaptive_failure_detector.heartbeat_interval", "aten.heartbeat_interval", [
2654+
{datatype, integer},
2655+
{validators, ["non_zero_positive_integer"]}
2656+
]}.
2657+
2658+
{translation, "aten.heartbeat_interval",
2659+
fun(Conf) ->
2660+
case cuttlefish:conf_get("raft.adaptive_failure_detector.heartbeat_interval", Conf, undefined) of
2661+
undefined -> cuttlefish:unset();
2662+
Val -> Val
2663+
end
2664+
end
2665+
}.
2666+
2667+
{mapping, "raft.adaptive_failure_detector.detection_threshold", "aten.detection_threshold", [
2668+
{datatype, float}
2669+
]}.
2670+
2671+
{translation, "aten.detection_threshold",
2672+
fun(Conf) ->
2673+
case cuttlefish:conf_get("raft.adaptive_failure_detector.detection_threshold", Conf, undefined) of
2674+
undefined -> cuttlefish:unset();
2675+
Val -> Val
2676+
end
2677+
end
2678+
}.
2679+
26402680
{mapping, "default_queue_type", "rabbit.default_queue_type", [
26412681
{datatype, atom}
26422682
]}.

deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,27 @@ credential_validator.regexp = ^abc\\d+",
11111111
]}],
11121112
[]},
11131113

1114+
{raft_adaptive_failure_detector_scaling_factor,
1115+
"raft.adaptive_failure_detector.scaling_factor = 1.5",
1116+
[{aten, [
1117+
{scaling_factor, 1.5}
1118+
]}],
1119+
[]},
1120+
1121+
{raft_adaptive_failure_detector_heartbeat_interval,
1122+
"raft.adaptive_failure_detector.heartbeat_interval = 100",
1123+
[{aten, [
1124+
{heartbeat_interval, 100}
1125+
]}],
1126+
[]},
1127+
1128+
{raft_adaptive_failure_detector_detection_threshold,
1129+
"raft.adaptive_failure_detector.detection_threshold = 0.99",
1130+
[{aten, [
1131+
{detection_threshold, 0.99}
1132+
]}],
1133+
[]},
1134+
11141135
%%
11151136
%% Backing queue version
11161137
%%

0 commit comments

Comments
 (0)