2424-define (COORD_WAL_MAX_SIZE_B , 64_000_000 ).
2525-define (QUORUM_AER_MAX_RPC_SIZE , 16 ).
2626-define (QUORUM_DEFAULT_WAL_MAX_ENTRIES , 500_000 ).
27+ % % the default min bin vheap value in OTP 26
28+ -define (MIN_BIN_VHEAP_SIZE_DEFAULT , 46422 ).
29+ -define (MIN_BIN_VHEAP_SIZE_MULT , 64 ).
2730
2831-spec setup () -> ok | no_return ().
2932
@@ -107,7 +110,6 @@ ensure_ra_system_started(RaSystem) ->
107110 end .
108111
109112-spec get_config (ra_system_name ()) -> ra_system :config ().
110-
111113get_config (quorum_queues = RaSystem ) ->
112114 DefaultConfig = get_default_config (),
113115 Checksums = application :get_env (rabbit , quorum_compute_checksums , true ),
@@ -124,7 +126,16 @@ get_config(quorum_queues = RaSystem) ->
124126 AERBatchSize = application :get_env (rabbit , quorum_max_append_entries_rpc_batch_size ,
125127 ? QUORUM_AER_MAX_RPC_SIZE ),
126128 CompressMemTables = application :get_env (rabbit , quorum_compress_mem_tables , true ),
129+ MinBinVheapSize = case code_version :get_otp_version () of
130+ OtpMaj when OtpMaj >= 27 ->
131+ ? MIN_BIN_VHEAP_SIZE_DEFAULT * ? MIN_BIN_VHEAP_SIZE_MULT ;
132+ _ ->
133+ ? MIN_BIN_VHEAP_SIZE_DEFAULT
134+ end ,
135+
127136 DefaultConfig #{name => RaSystem ,
137+ wal_min_bin_vheap_size => MinBinVheapSize ,
138+ server_min_bin_vheap_size => MinBinVheapSize ,
128139 default_max_append_entries_rpc_batch_size => AERBatchSize ,
129140 wal_compute_checksums => WalChecksums ,
130141 wal_max_entries => WalMaxEntries ,
0 commit comments