File tree Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -288,12 +288,6 @@ retry_timeout() ->
288288 undefined -> 300_000
289289 end .
290290
291- retry_limit () ->
292- case application :get_env (rabbit , khepri_leader_wait_retry_limit ) of
293- {ok , T } -> T ;
294- undefined -> 10
295- end .
296-
297291% % @private
298292
299293-spec init (IsVirgin ) -> Ret when
@@ -333,22 +327,13 @@ init(IsVirgin) ->
333327 end .
334328
335329await_replication () ->
336- await_replication (retry_timeout (), retry_limit ()).
337-
338- await_replication (_Timeout , 0 ) ->
339- {error , timeout };
340- await_replication (Timeout , Retries ) ->
330+ Timeout = retry_timeout (),
341331 ? LOG_DEBUG (
342332 " Khepri-based " ? RA_FRIENDLY_NAME " waiting to catch up on replication "
343- " to the Raft cluster leader. Waiting for ~tb ms, ~tb retries left " ,
344- [Timeout , Retries ],
333+ " to the Raft cluster leader. Waiting for ~tb ms" ,
334+ [Timeout ],
345335 #{domain => ? RMQLOG_DOMAIN_DB }),
346- case fence (Timeout ) of
347- ok ->
348- ok ;
349- {error , timeout } ->
350- await_replication (Timeout , Retries - 1 )
351- end .
336+ fence (Timeout ).
352337
353338% % @private
354339
You can’t perform that action at this time.
0 commit comments