~ne02ptzero/libfloat

log: Don't trigger an election when an unknown leader have a lower term v1 APPLIED

Louis Solofrizzo: 1
 log: Don't trigger an election when an unknown leader have a lower term

 1 files changed, 6 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~ne02ptzero/libfloat/patches/37045/mbox | git am -3
Learn more about email & git

[PATCH] log: Don't trigger an election when an unknown leader have a lower term Export this patch

Signed-off-by: Louis Solofrizzo <lsolofrizzo@scaleway.com>
---
 log.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/log.c b/log.c
index 51a8cc7..a9e55c3 100644
--- a/log.c
+++ b/log.c
@@ -406,6 +406,12 @@ void libfloat_append_entries_receive(libfloat_ctx_t *ctx, libfloat_rpc_append_en
        }
        else
        {
            if (node == NULL)
            {
                /* This leader is unknown, let's not trigger an election for that */
                return;
            }

            /* Who are you and how are you in a position of leadership? */
            DEBUG(ctx, "libfloat_append_entries_receive: Dropping AE term=%d remote_term=%d", ctx->persistent.term, req->term);
            libfloat_election_start(ctx, .reason = "Dropping mismatch AE term");
-- 
2.38.1
LG