Skip to content

Commit

Permalink
Closes #9733
Browse files Browse the repository at this point in the history
(cherry picked from commit e87a399)
(cherry picked from commit 687f2af)
  • Loading branch information
michaelklishin authored and mergify[bot] committed Oct 19, 2023
1 parent 2b55d38 commit 22690c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion deps/rabbit/priv/schema/rabbit.schema
Expand Up @@ -2336,7 +2336,7 @@ end}.

{mapping, "raft.segment_max_entries", "ra.segment_max_entries", [
{datatype, integer},
{validators, ["non_zero_positive_integer"]}
{validators, ["non_zero_positive_integer", "non_zero_positive_16_bit_integer"]}
]}.

{translation, "ra.segment_max_entries",
Expand Down Expand Up @@ -2550,6 +2550,11 @@ fun(Int) when is_integer(Int) ->
Int >= 1
end}.

{validator, "non_zero_positive_16_bit_integer", "number should be between 1 and 65535",
fun(Int) when is_integer(Int) ->
(Int >= 1) and (Int =< 65535)
end}.

{validator, "valid_regex", "string must be a valid regular expression",
fun("") -> false;
(String) -> {Res, _ } = re:compile(String),
Expand Down
4 changes: 2 additions & 2 deletions deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets
Expand Up @@ -851,9 +851,9 @@ credential_validator.regexp = ^abc\\d+",
[]},

{raft_segment_max_entries,
"raft.segment_max_entries = 65536",
"raft.segment_max_entries = 32768",
[{ra, [
{segment_max_entries, 65536}
{segment_max_entries, 32768}
]}],
[]},

Expand Down

0 comments on commit 22690c3

Please sign in to comment.