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:
Claude
2026-02-21 14:18:30 +00:00
parent 8233392871
commit fe7d79098e
4 changed files with 2 additions and 3 deletions
-1
View File
@@ -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;
}