Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <cole.miller@canonical.com>
  • Loading branch information
cole-miller committed Apr 19, 2023
1 parent 9fb7436 commit 14d8ab7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/role_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* adjustment if a "tick" occurs while the queue of changes from the last
* round is still nonempty.
*
* A handover is triggered when we call dqlite_node_stop on a node that's
* A handover is triggered when we call dqlite_node_handover on a node that's
* the current cluster leader, or is a voter. Before shutting down for real,
* the node in question tries to cause another node to become leader (using
* raft_transfer), if applicable, and then promotes another node to voter
Expand Down Expand Up @@ -670,6 +670,7 @@ void RoleManagementAdjust(struct dqlite_node *d)
if (!QUEUE__IS_EMPTY(&d->changes)) {
return;
}
assert(d->running);
pollCluster(d, adjustClusterCb);
}

Expand Down
10 changes: 5 additions & 5 deletions src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ struct dqlite_node
struct raft_uv_transport raft_transport; /* Raft libuv transport */
struct raft_io raft_io; /* libuv I/O */
struct raft_fsm raft_fsm; /* dqlite FSM */
sem_t ready; /* Server is ready */
sem_t stopped; /* Notify loop stopped */
sem_t ready; /* Server is ready */
sem_t stopped; /* Notify loop stopped */
sem_t handover_done;
queue queue; /* Incoming connections */
queue conns; /* Active connections */
queue queue; /* Incoming connections */
queue conns; /* Active connections */
queue changes;
bool running; /* Loop is running */
bool running; /* Loop is running */
struct raft raft; /* Raft instance */
struct uv_stream_s *listener; /* Listening socket */
struct uv_async_s handover;
Expand Down

0 comments on commit 14d8ab7

Please sign in to comment.