Skip to content

Commit 8d71e0c

Browse files
the-mikedavismergify[bot]
authored andcommitted
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. (cherry picked from commit c81fbc5) # Conflicts: # deps/rabbit/priv/schema/rabbit.schema # deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets
1 parent 639df7d commit 8d71e0c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

deps/rabbit/priv/schema/rabbit.schema

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

2802+
<<<<<<< HEAD
28022803
%% See github.com/rabbitmq/osiris#192 and https://github.com/rabbitmq/rabbitmq-server/commit/9f162dfd01c1516d168e7d1fad39d33a929756e5
28032804
%% Enables read-head
2805+
=======
2806+
{mapping, "stream.data_dir", "osiris.data_dir", [
2807+
{datatype, string}
2808+
]}.
2809+
2810+
{translation, "osiris.data_dir",
2811+
fun(Conf) ->
2812+
case cuttlefish:conf_get("stream.data_dir", Conf, undefined) of
2813+
undefined -> cuttlefish:unset();
2814+
Val -> Val
2815+
end
2816+
end
2817+
}.
2818+
2819+
>>>>>>> c81fbc5dc (Allow configuring osiris data_dir in Cuttlefish config)
28042820
{mapping, "stream.read_ahead", "rabbit.stream_read_ahead",
28052821
[{datatype, [{enum, [true, false]}, integer, string]}]}.
28062822

deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 11 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+
<<<<<<< HEAD
12811282
{stream_read_ahead_limit_bytes,
12821283
"
12831284
stream.read_ahead = 8192
@@ -1292,6 +1293,16 @@ credential_validator.regexp = ^abc\\d+",
12921293
",
12931294
[{rabbit, [
12941295
{stream_read_ahead, "8KiB"}
1296+
=======
1297+
1298+
%%
1299+
%% Stream data dir
1300+
%%
1301+
{stream_data_dir,
1302+
"stream.data_dir = /data/rabbitmq/stream",
1303+
[{osiris, [
1304+
{data_dir, "/data/rabbitmq/stream"}
1305+
>>>>>>> c81fbc5dc (Allow configuring osiris data_dir in Cuttlefish config)
12951306
]}],
12961307
[]}
12971308
].

0 commit comments

Comments
 (0)