Skip to content

Commit 0b56950

Browse files
Merge pull request #15014 from rabbitmq/mergify/bp/v4.2.x/pr-14814
Allow configuring osiris data_dir in Cuttlefish config (backport #14814)
2 parents 639df7d + 02d5729 commit 0b56950

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

deps/rabbit/priv/schema/rabbit.schema

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,8 +2799,19 @@ fun(Conf) ->
27992799
end
28002800
end}.
28012801

2802-
%% See github.com/rabbitmq/osiris#192 and https://github.com/rabbitmq/rabbitmq-server/commit/9f162dfd01c1516d168e7d1fad39d33a929756e5
2803-
%% Enables read-head
2802+
{mapping, "stream.data_dir", "osiris.data_dir", [
2803+
{datatype, string}
2804+
]}.
2805+
2806+
{translation, "osiris.data_dir",
2807+
fun(Conf) ->
2808+
case cuttlefish:conf_get("stream.data_dir", Conf, undefined) of
2809+
undefined -> cuttlefish:unset();
2810+
Val -> Val
2811+
end
2812+
end
2813+
}.
2814+
28042815
{mapping, "stream.read_ahead", "rabbit.stream_read_ahead",
28052816
[{datatype, [{enum, [true, false]}, integer, string]}]}.
28062817

deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,7 @@ credential_validator.regexp = ^abc\\d+",
12781278
{stream_read_ahead, false}
12791279
]}],
12801280
[]},
1281+
12811282
{stream_read_ahead_limit_bytes,
12821283
"
12831284
stream.read_ahead = 8192
@@ -1293,5 +1294,16 @@ credential_validator.regexp = ^abc\\d+",
12931294
[{rabbit, [
12941295
{stream_read_ahead, "8KiB"}
12951296
]}],
1297+
[]},
1298+
1299+
%%
1300+
%% Stream data dir
1301+
%%
1302+
1303+
{stream_data_dir,
1304+
"stream.data_dir = /data/rabbitmq/stream",
1305+
[{osiris, [
1306+
{data_dir, "/data/rabbitmq/stream"}
1307+
]}],
12961308
[]}
12971309
].

0 commit comments

Comments
 (0)