Skip to content

Commit c81fbc5

Browse files
committed
Allow configuring osiris data_dir in Cuttlefish config
This is the same as the `raft.data_dir` option but for Osiris' data directory. Configuring this in Cuttlefish is nicer than the existing `$RABBITMQ_STREAM_DIR` environment variable way of changing the dir.
1 parent edc5f43 commit c81fbc5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

deps/rabbit/priv/schema/rabbit.schema

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,19 @@ fun(Conf) ->
27762776
end
27772777
end}.
27782778

2779+
{mapping, "stream.data_dir", "osiris.data_dir", [
2780+
{datatype, string}
2781+
]}.
2782+
2783+
{translation, "osiris.data_dir",
2784+
fun(Conf) ->
2785+
case cuttlefish:conf_get("stream.data_dir", Conf, undefined) of
2786+
undefined -> cuttlefish:unset();
2787+
Val -> Val
2788+
end
2789+
end
2790+
}.
2791+
27792792
{mapping, "stream.read_ahead", "rabbit.stream_read_ahead",
27802793
[{datatype, {enum, [true, false]}}]}.
27812794

deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,16 @@ credential_validator.regexp = ^abc\\d+",
12531253
[{rabbit, [
12541254
{stream_read_ahead, false}
12551255
]}],
1256+
[]},
1257+
1258+
%%
1259+
%% Stream data dir
1260+
%%
1261+
{stream_data_dir,
1262+
"stream.data_dir = /data/rabbitmq/stream",
1263+
[{osiris, [
1264+
{data_dir, "/data/rabbitmq/stream"}
1265+
]}],
12561266
[]}
12571267

12581268
].

0 commit comments

Comments
 (0)