Skip to content

Commit 95a32d3

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 1262b01 commit 95a32d3

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
@@ -1273,6 +1273,16 @@ credential_validator.regexp = ^abc\\d+",
12731273
[{rabbit, [
12741274
{stream_read_ahead_limit, "8KiB"}
12751275
]}],
1276+
[]},
1277+
1278+
%%
1279+
%% Stream data dir
1280+
%%
1281+
{stream_data_dir,
1282+
"stream.data_dir = /data/rabbitmq/stream",
1283+
[{osiris, [
1284+
{data_dir, "/data/rabbitmq/stream"}
1285+
]}],
12761286
[]}
12771287

12781288
].

0 commit comments

Comments
 (0)