|
23 | 23 |
|
24 | 24 | -define(COORD_WAL_MAX_SIZE_B, 64_000_000). |
25 | 25 | -define(QUORUM_AER_MAX_RPC_SIZE, 16). |
| 26 | +-define(QUORUM_DEFAULT_WAL_MAX_ENTRIES, 500_000). |
26 | 27 |
|
27 | 28 | -spec setup() -> ok | no_return(). |
28 | 29 |
|
@@ -111,13 +112,22 @@ get_config(quorum_queues = RaSystem) -> |
111 | 112 | DefaultConfig = get_default_config(), |
112 | 113 | Checksums = application:get_env(rabbit, quorum_compute_checksums, true), |
113 | 114 | WalChecksums = application:get_env(rabbit, quorum_wal_compute_checksums, Checksums), |
114 | | - SegmentChecksums = application:get_env(rabbit, quorum_segment_compute_checksums, Checksums), |
| 115 | + SegmentChecksums = application:get_env(rabbit, quorum_segment_compute_checksums, |
| 116 | + Checksums), |
| 117 | + WalMaxEntries = case DefaultConfig of |
| 118 | + #{wal_max_entries := MaxEntries} |
| 119 | + when is_integer(MaxEntries) -> |
| 120 | + MaxEntries; |
| 121 | + _ -> |
| 122 | + ?QUORUM_DEFAULT_WAL_MAX_ENTRIES |
| 123 | + end, |
115 | 124 | AERBatchSize = application:get_env(rabbit, quorum_max_append_entries_rpc_batch_size, |
116 | 125 | ?QUORUM_AER_MAX_RPC_SIZE), |
117 | | - CompressMemTables = application:get_env(rabbit, quorum_compress_mem_tables, false), |
| 126 | + CompressMemTables = application:get_env(rabbit, quorum_compress_mem_tables, true), |
118 | 127 | DefaultConfig#{name => RaSystem, |
119 | 128 | default_max_append_entries_rpc_batch_size => AERBatchSize, |
120 | 129 | wal_compute_checksums => WalChecksums, |
| 130 | + wal_max_entries => WalMaxEntries, |
121 | 131 | segment_compute_checksums => SegmentChecksums, |
122 | 132 | compress_mem_tables => CompressMemTables}; |
123 | 133 | get_config(coordination = RaSystem) -> |
|
0 commit comments