Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ds-ws18
yfs-lab
Commits
e06ff288
Commit
e06ff288
authored
Mar 02, 2021
by
Mohamed Alzayat
Browse files
variable confusion bug fix -- reported by Rhett (ds-ws18)
parent
d54a93e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
paxos.cc
View file @
e06ff288
...
...
@@ -86,7 +86,7 @@ proposer::setn()
}
bool
proposer
::
run
(
int
instance
,
std
::
vector
<
std
::
string
>
new
nodes
,
std
::
string
new
v
)
proposer
::
run
(
int
instance
,
std
::
vector
<
std
::
string
>
c_
nodes
,
std
::
string
c_
v
)
{
std
::
vector
<
std
::
string
>
accepts
;
std
::
vector
<
std
::
string
>
nodes
;
...
...
@@ -96,7 +96,7 @@ proposer::run(int instance, std::vector<std::string> newnodes, std::string newv)
pthread_mutex_lock
(
&
pxs_mutex
);
printf
(
"start: initiate paxos for %s w. i=%d v=%s stable=%d
\n
"
,
print_members
(
new
nodes
).
c_str
(),
instance
,
new
v
.
c_str
(),
stable
);
print_members
(
c_
nodes
).
c_str
(),
instance
,
c_
v
.
c_str
(),
stable
);
if
(
!
stable
)
{
// already running proposer?
printf
(
"proposer::run: already running
\n
"
);
pthread_mutex_unlock
(
&
pxs_mutex
);
...
...
paxos.h
View file @
e06ff288
...
...
@@ -70,8 +70,6 @@ class proposer {
// Proposer state
bool
stable
;
std
::
vector
<
std
::
string
>
c_nodes
;
// nodes in this instance
std
::
string
c_v
;
// value we would like to propose
prop_t
my_n
;
// number of the last proposal used in this instance
void
setn
();
...
...
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