Skip to content

Commit 3b9346f

Browse files
Sarah Hassanfacebook-github-bot
Sarah Hassan
authored andcommitted
remove noisy logs when witness times out
Summary: Remove logging on witness timeout after not hearing a heartbeat from leader. Differential Revision: D53452659 fbshipit-source-id: f52c370a8092abfb640a48bd649cc8effe3ab978
1 parent ad8560c commit 3b9346f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/wa_raft_server.erl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,15 +1455,7 @@ witness(internal, ?ADVANCE_TERM(Term), #raft_state{name = Name, current_term = C
14551455
[Name, CurrentTerm, Term], #{domain => [whatsapp, wa_raft]}),
14561456
keep_state_and_data;
14571457

1458-
witness(state_timeout, _, #raft_state{name = Name, current_term = CurrentTerm, leader_id = LeaderId,
1459-
log_view = View, leader_heartbeat_ts = HeartbeatTs} = State) ->
1460-
WaitingMs = case HeartbeatTs of
1461-
undefined -> undefined;
1462-
_ -> erlang:monotonic_time(millisecond) - HeartbeatTs
1463-
end,
1464-
?LOG_NOTICE("Server[~0p, term ~0p, witness] times out after ~p ms. Last leader ~p. Max log index ~p.",
1465-
[Name, CurrentTerm, WaitingMs, LeaderId, wa_raft_log:last_index(View)], #{domain => [whatsapp, wa_raft]}),
1466-
?RAFT_COUNT('raft.witness.timeout'),
1458+
witness(state_timeout, _, State) ->
14671459
{repeat_state, State};
14681460

14691461
%% [Protocol] Handle any RPCs

0 commit comments

Comments
 (0)