Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Willemt Raft
Commits
fb7da237
Commit
fb7da237
authored
May 22, 2016
by
Willem Thiart
Browse files
Refactor: 1 node cluster
parent
bd54c09b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/raft_server.c
View file @
fb7da237
...
...
@@ -615,8 +615,8 @@ int raft_recv_entry(raft_server_t* me_,
}
/* if we're the only node, we can consider the entry committed */
if
(
1
==
me
->
num_nodes
)
me
->
commit_idx
=
raft_get_current_idx
(
me_
);
if
(
1
==
raft_get_num_voting_nodes
(
me_
)
)
raft_set_
commit_idx
(
me_
,
raft_get_current_idx
(
me_
)
)
;
r
->
id
=
e
->
id
;
r
->
idx
=
raft_get_current_idx
(
me_
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment