~ne02ptzero/libfloat

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] log: Only ERROR log on smaller commit_id when it is problematic

Louis Solofrizzo <lsolofrizzo@scaleway.com>
Details
Message ID
<20231220115612.1462961-1-lsolofrizzo@scaleway.com>
DKIM signature
missing
Download raw message
Patch: +4 -1
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
Details
Message ID
<a8ae4803-1a38-4d2c-9383-a3c50b42bb04@ptrk.io>
In-Reply-To
<20231220115612.1462961-1-lsolofrizzo@scaleway.com> (view parent)
DKIM signature
missing
Download raw message
LG
Reply to thread Export thread (mbox)