Otherwise, DEBUG it. Should generate less logs on production / tests.
Signed-off-by: Louis Solofrizzo <lsolofrizzo@scaleway.com>
---
log.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/log.c b/log.c
index 7e4b58d..417aa16 100644
--- a/log.c
+++ b/log.c
@@ -678,6 +678,9 @@ void libfloat_append_entries_response(libfloat_ctx_t *ctx, libfloat_rpc_append_e
{
/* We have 20 consecutive hertbeats telling the same story, let's believe it */
+ ERROR(ctx, "libfloat_append_entries_response: node %d: received current_index (%u) older than replicated_log (%u)",
+ node->id, resp->current_index, node->replicated_log);
+
node->announced_log_count = 0;
node->next_log_to_send = max(resp->current_index + 1, 1);
node->replicated_log = resp->current_index;
@@ -691,7 +694,7 @@ void libfloat_append_entries_response(libfloat_ctx_t *ctx, libfloat_rpc_append_e
node->announced_log = resp->current_index;
}
- ERROR(ctx, "libfloat_append_entries_response: node %d: received current_index (%u) older than replicated_log (%u) (count=%lu)",
+ DEBUG(ctx, "libfloat_append_entries_response: node %d: received current_index (%u) older than replicated_log (%u) (count=%lu)",
node->id, resp->current_index, node->replicated_log, node->announced_log_count);
return;
}
--
2.43.0