Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions deps/rabbit/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ _APP_ENV = """[
%% writing to the queue index. See the setting
%% queue_index_embed_msgs_below above.
{msg_store_credit_disc_bound, {4000, 800}},
{msg_store_io_batch_size, 4096},
%% see rabbitmq-server#143,
%% rabbitmq-server#949, rabbitmq-server#1098
{credit_flow_default_credit, {400, 200}},
Expand Down Expand Up @@ -532,14 +531,6 @@ rabbitmq_integration_suite(
],
)

rabbitmq_suite(
name = "msg_store_SUITE",
size = "small",
deps = [
"//deps/rabbit_common:erlang_app",
],
)

rabbitmq_integration_suite(
name = "peer_discovery_classic_config_SUITE",
size = "large",
Expand Down
4 changes: 1 addition & 3 deletions deps/rabbit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ define PROJECT_ENV
%% writing to the queue index. See the setting
%% queue_index_embed_msgs_below above.
{msg_store_credit_disc_bound, {4000, 800}},
{msg_store_io_batch_size, 4096},
%% see rabbitmq-server#143,
%% rabbitmq-server#949, rabbitmq-server#1098
{credit_flow_default_credit, {400, 200}},
Expand Down Expand Up @@ -192,7 +191,6 @@ SLOW_CT_SUITES := backing_queue \
health_check \
many_node_ha \
metrics \
msg_store \
partitions \
per_user_connection_tracking \
per_vhost_connection_limit \
Expand Down Expand Up @@ -272,7 +270,7 @@ PARALLEL_CT_SET_2_D = queue_length_limits queue_parallel quorum_queue_member_rec
PARALLEL_CT_SET_3_A = definition_import per_user_connection_channel_limit_partitions per_vhost_connection_limit_partitions policy priority_queue_recovery rabbit_fifo_prop rabbit_fifo_v0 rabbit_stream_sac_coordinator unit_credit_flow unit_queue_consumers unit_queue_location unit_quorum_queue
PARALLEL_CT_SET_3_B = cluster_upgrade list_consumers_sanity_check list_queues_online_and_offline logging lqueue maintenance_mode rabbit_fifo_q
PARALLEL_CT_SET_3_C = cli_forget_cluster_node feature_flags_v2 mc_unit message_containers_deaths_v2 message_size_limit metadata_store_migration
PARALLEL_CT_SET_3_D = metadata_store_phase1 metrics mirrored_supervisor msg_store peer_discovery_classic_config proxy_protocol runtime_parameters unit_stats_and_metrics unit_supervisor2 unit_vm_memory_monitor
PARALLEL_CT_SET_3_D = metadata_store_phase1 metrics mirrored_supervisor peer_discovery_classic_config proxy_protocol runtime_parameters unit_stats_and_metrics unit_supervisor2 unit_vm_memory_monitor

PARALLEL_CT_SET_4_A = clustering_events rabbit_local_random_exchange rabbit_message_interceptor rabbitmq_4_0_deprecations unit_pg_local unit_plugin_directories unit_plugin_versioning unit_policy_validators unit_priority_queue
PARALLEL_CT_SET_4_B = per_user_connection_tracking per_vhost_connection_limit rabbit_fifo_dlx_integration rabbit_fifo_int
Expand Down
9 changes: 0 additions & 9 deletions deps/rabbit/app.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1073,15 +1073,6 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
beam = ["ebin/mirrored_supervisor.beam"],
erlc_opts = "//:test_erlc_opts",
)
erlang_bytecode(
name = "msg_store_SUITE_beam_files",
testonly = True,
srcs = ["test/msg_store_SUITE.erl"],
outs = ["test/msg_store_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app"],
)
erlang_bytecode(
name = "peer_discovery_classic_config_SUITE_beam_files",
testonly = True,
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/ct.test.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
, metadata_store_phase1_SUITE
, metrics_SUITE
, mirrored_supervisor_SUITE
, msg_store_SUITE
, peer_discovery_classic_config_SUITE
]}.

Expand Down
95 changes: 0 additions & 95 deletions deps/rabbit/src/rabbit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
pg_local_amqp_session/0,
pg_local_amqp_connection/0]).

%% for tests
-export([validate_msg_store_io_batch_size_and_credit_disc_bound/2]).

-rabbit_boot_step({pre_boot, [{description, "rabbit boot start"}]}).

-rabbit_boot_step({codec_correctness_check,
Expand Down Expand Up @@ -291,8 +288,6 @@

-define(APPS, [os_mon, mnesia, rabbit_common, rabbitmq_prelaunch, ra, sysmon_handler, rabbit, osiris]).

-define(DIRTY_IO_SCHEDULERS_WARNING_THRESHOLD, 10).

%% 1 minute
-define(BOOT_START_TIMEOUT, 1 * 60 * 1000).
%% 12 hours
Expand Down Expand Up @@ -971,7 +966,6 @@ start(normal, []) ->
print_banner(),
log_banner(),
warn_if_kernel_config_dubious(),
warn_if_disc_io_options_dubious(),

?LOG_DEBUG(""),
?LOG_DEBUG("== Plugins (prelaunch phase) =="),
Expand Down Expand Up @@ -1434,14 +1428,6 @@ warn_if_kernel_config_dubious() ->
#{domain => ?RMQLOG_DOMAIN_GLOBAL})
end
end,
DirtyIOSchedulers = erlang:system_info(dirty_io_schedulers),
case DirtyIOSchedulers < ?DIRTY_IO_SCHEDULERS_WARNING_THRESHOLD of
true -> ?LOG_WARNING(
"Erlang VM is running with ~b dirty I/O schedulers, "
"file I/O performance may worsen", [DirtyIOSchedulers],
#{domain => ?RMQLOG_DOMAIN_GLOBAL});
false -> ok
end,
IDCOpts = case application:get_env(kernel, inet_default_connect_options) of
undefined -> [];
{ok, Val} -> Val
Expand All @@ -1453,87 +1439,6 @@ warn_if_kernel_config_dubious() ->
true -> ok
end.

warn_if_disc_io_options_dubious() ->
%% if these values are not set, it doesn't matter since
%% rabbit_variable_queue will pick up the values defined in the
%% IO_BATCH_SIZE and CREDIT_DISC_BOUND constants.
CreditDiscBound = rabbit_misc:get_env(rabbit, msg_store_credit_disc_bound,
undefined),
IoBatchSize = rabbit_misc:get_env(rabbit, msg_store_io_batch_size,
undefined),
case catch validate_msg_store_io_batch_size_and_credit_disc_bound(
CreditDiscBound, IoBatchSize) of
ok -> ok;
{error, {Reason, Vars}} ->
?LOG_WARNING(Reason, Vars,
#{domain => ?RMQLOG_DOMAIN_GLOBAL})
end.

validate_msg_store_io_batch_size_and_credit_disc_bound(CreditDiscBound,
IoBatchSize) ->
case IoBatchSize of
undefined ->
ok;
IoBatchSize when is_integer(IoBatchSize) ->
if IoBatchSize < ?IO_BATCH_SIZE ->
throw({error,
{"io_batch_size of ~b lower than recommended value ~b, "
"paging performance may worsen",
[IoBatchSize, ?IO_BATCH_SIZE]}});
true ->
ok
end;
IoBatchSize ->
throw({error,
{"io_batch_size should be an integer, but ~b given",
[IoBatchSize]}})
end,

%% CreditDiscBound = {InitialCredit, MoreCreditAfter}
{RIC, RMCA} = ?CREDIT_DISC_BOUND,
case CreditDiscBound of
undefined ->
ok;
{IC, MCA} when is_integer(IC), is_integer(MCA) ->
if IC < RIC; MCA < RMCA ->
throw({error,
{"msg_store_credit_disc_bound {~b, ~b} lower than"
"recommended value {~b, ~b},"
" paging performance may worsen",
[IC, MCA, RIC, RMCA]}});
true ->
ok
end;
{IC, MCA} ->
throw({error,
{"both msg_store_credit_disc_bound values should be integers, but ~tp given",
[{IC, MCA}]}});
CreditDiscBound ->
throw({error,
{"invalid msg_store_credit_disc_bound value given: ~tp",
[CreditDiscBound]}})
end,

case {CreditDiscBound, IoBatchSize} of
{undefined, undefined} ->
ok;
{_CDB, undefined} ->
ok;
{undefined, _IBS} ->
ok;
{{InitialCredit, _MCA}, IoBatchSize} ->
if IoBatchSize < InitialCredit ->
throw(
{error,
{"msg_store_io_batch_size ~b should be bigger than the initial "
"credit value from msg_store_credit_disc_bound ~b,"
" paging performance may worsen",
[IoBatchSize, InitialCredit]}});
true ->
ok
end
end.

-spec product_name() -> string().

product_name() ->
Expand Down
8 changes: 3 additions & 5 deletions deps/rabbit/src/rabbit_variable_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
disk_read_count,
disk_write_count,

io_batch_size,
io_batch_size, %% Unused.

%% default queue or lazy queue
mode, %% Unused.
Expand Down Expand Up @@ -334,7 +334,7 @@
disk_read_count :: non_neg_integer(),
disk_write_count :: non_neg_integer(),

io_batch_size :: pos_integer(),
io_batch_size :: 0,
mode :: 'default' | 'lazy',
version :: 2,
unconfirmed_simple :: sets:set()}.
Expand Down Expand Up @@ -1195,8 +1195,6 @@ init(IsDurable, IndexState, StoreState, DeltaCount, DeltaBytes, Terms,
end_seq_id = NextSeqId })
end,
Now = erlang:monotonic_time(),
IoBatchSize = rabbit_misc:get_env(rabbit, msg_store_io_batch_size,
?IO_BATCH_SIZE),

{ok, IndexMaxSize} = application:get_env(
rabbit, queue_index_embed_msgs_below),
Expand Down Expand Up @@ -1242,7 +1240,7 @@ init(IsDurable, IndexState, StoreState, DeltaCount, DeltaBytes, Terms,
disk_read_count = 0,
disk_write_count = 0,

io_batch_size = IoBatchSize,
io_batch_size = 0,

mode = default,
virtual_host = VHost},
Expand Down
52 changes: 0 additions & 52 deletions deps/rabbit/test/msg_store_SUITE.erl

This file was deleted.

Loading