diff mbox series

[ovs-dev,v2,1/4] raft.c: Move raft_reset_ping_timer() out of the loop.

Message ID 1565822223-90171-1-git-send-email-hzhou8@ebay.com
State Superseded
Headers show
Series [ovs-dev,v2,1/4] raft.c: Move raft_reset_ping_timer() out of the loop. | expand

Commit Message

Han Zhou Aug. 14, 2019, 10:37 p.m. UTC
From: Han Zhou <hzhou8@ebay.com>

Fixes: commit 5a9b53a5 ("ovsdb raft: Fix duplicated transaction execution when leader failover.")
Signed-off-by: Han Zhou <hzhou8@ebay.com>
---
 ovsdb/raft.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Han Zhou Aug. 19, 2019, 4:47 p.m. UTC | #1
I just sent V3 of the series which mainly adds the 5th patch to the series
for changing election timer online. In addition, there are just minor fixes
in test cases.

https://patchwork.ozlabs.org/project/openvswitch/list/?series=126000

I hope at least 1/5 - 4/5 can get in branch 2.12. 5/5 is optional.

Thanks,
Han

On Wed, Aug 14, 2019 at 3:37 PM Han Zhou <zhouhan@gmail.com> wrote:

> From: Han Zhou <hzhou8@ebay.com>
>
> Fixes: commit 5a9b53a5 ("ovsdb raft: Fix duplicated transaction execution
> when leader failover.")
> Signed-off-by: Han Zhou <hzhou8@ebay.com>
> ---
>  ovsdb/raft.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ovsdb/raft.c b/ovsdb/raft.c
> index c60ef41..1c38b3b 100644
> --- a/ovsdb/raft.c
> +++ b/ovsdb/raft.c
> @@ -1816,8 +1816,8 @@ raft_run(struct raft *raft)
>                  && now - cmd->timestamp > ELECTION_BASE_MSEC * 2) {
>                  raft_command_complete(raft, cmd, RAFT_CMD_TIMEOUT);
>              }
> -            raft_reset_ping_timer(raft);
>          }
> +        raft_reset_ping_timer(raft);
>      }
>
>      /* Do this only at the end; if we did it as soon as we set raft->left
> or
> --
> 2.1.0
>
>
diff mbox series

Patch

diff --git a/ovsdb/raft.c b/ovsdb/raft.c
index c60ef41..1c38b3b 100644
--- a/ovsdb/raft.c
+++ b/ovsdb/raft.c
@@ -1816,8 +1816,8 @@  raft_run(struct raft *raft)
                 && now - cmd->timestamp > ELECTION_BASE_MSEC * 2) {
                 raft_command_complete(raft, cmd, RAFT_CMD_TIMEOUT);
             }
-            raft_reset_ping_timer(raft);
         }
+        raft_reset_ping_timer(raft);
     }
 
     /* Do this only at the end; if we did it as soon as we set raft->left or