131131-define (MEMBER_CHANGE_TIMEOUT , 20_000 ).
132132-define (SNAPSHOT_INTERVAL , 8192 ). % % the ra default is 4096
133133% -define(UNLIMITED_PREFETCH_COUNT, 2000). %% something large for ra
134+ -define (MIN_CHECKPOINT_INTERVAL , 8192 ). % % the ra default is 16384
134135
135136% %----------- QQ policies ---------------------------------------------------
136137
@@ -1777,9 +1778,14 @@ make_ra_conf(Q, ServerId, Membership) ->
17771778 ? TICK_TIMEOUT ),
17781779 SnapshotInterval = application :get_env (rabbit , quorum_snapshot_interval ,
17791780 ? SNAPSHOT_INTERVAL ),
1780- make_ra_conf (Q , ServerId , TickTimeout , SnapshotInterval , Membership ).
1781-
1782- make_ra_conf (Q , ServerId , TickTimeout , SnapshotInterval , Membership ) ->
1781+ CheckpointInterval = application :get_env (rabbit ,
1782+ quorum_min_checkpoint_interval ,
1783+ ? MIN_CHECKPOINT_INTERVAL ),
1784+ make_ra_conf (Q , ServerId , TickTimeout ,
1785+ SnapshotInterval , CheckpointInterval , Membership ).
1786+
1787+ make_ra_conf (Q , ServerId , TickTimeout ,
1788+ SnapshotInterval , CheckpointInterval , Membership ) ->
17831789 QName = amqqueue :get_name (Q ),
17841790 RaMachine = ra_machine (Q ),
17851791 [{ClusterName , _ } | _ ] = Members = members (Q ),
@@ -1794,7 +1800,9 @@ make_ra_conf(Q, ServerId, TickTimeout, SnapshotInterval, Membership) ->
17941800 metrics_key => QName ,
17951801 initial_members => Members ,
17961802 log_init_args => #{uid => UId ,
1797- snapshot_interval => SnapshotInterval },
1803+ snapshot_interval => SnapshotInterval ,
1804+ min_checkpoint_interval =>
1805+ CheckpointInterval },
17981806 tick_timeout => TickTimeout ,
17991807 machine => RaMachine ,
18001808 ra_event_formatter => Formatter }).
0 commit comments