~ne02ptzero/libfloat

Reset status node when node become leader v1 APPLIED

Michael Bonfils: 1
 Reset status node when node become leader

 1 files changed, 4 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/30054/mbox | git am -3
Learn more about email & git

[PATCH] Reset status node when node become leader Export this patch

---
 raft.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/raft.c b/raft.c
index 8bd9322..283d2c6 100644
--- a/raft.c
+++ b/raft.c
@@ -19,7 +19,11 @@ void libfloat_become_leader(libfloat_ctx_t *ctx)
    for_every_node(ctx, node, {
        /* Let's notify all the nodes */
        if (node != ctx->me)
        {
            libfloat_send_append_entries(ctx, node, true);
            node->replicated_log = 0;
            node->next_log_to_send = 1;
        }
    });

    ctx->me->is_up_to_date = 1;
-- 
2.25.1
LGTM

-- 
Louis Solofrizzo
Team Storage
> There is no sin but ignorance.
> -- Christopher Marlowe
LG