Move CEIL macro to basic.h and remove unnecessary heartbeat reset
- Move the CEIL macro from config.h to basic.h alongside MIN/MAX, and use it in deadline_to_timeout for the rounding-up division - Remove the heartbeat reset in complete_view_change_and_become_primary since it was not needed — heartbeat is already set when the node enters STATUS_CHANGE_VIEW, which is close enough in time https://claude.ai/code/session_0184gHjra7fsmSPZ4kppaGhC
This commit is contained in:
@@ -517,7 +517,6 @@ complete_view_change_and_become_primary(ServerState *state)
|
||||
broadcast_to_peers_ex(state, &begin_view_message.base, state->log.entries, state->log.count * sizeof(LogEntry));
|
||||
|
||||
clear_view_change_fields(state);
|
||||
state->heartbeat = state->now;
|
||||
return HR_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user