Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfdi committed May 14, 2015
1 parent c734650 commit 5e4335d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/apps/replication/lib/replica_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,12 @@ void replica::assign_primary(configuration_update_request& proposal)

void replica::add_potential_secondary(configuration_update_request& proposal)
{
dassert(proposal.config.ballot == get_ballot(), "");
if (status() != PS_PRIMARY)
{
dassert(status() == PS_INACTIVE, "");
return;
}

dassert (proposal.config.ballot == get_ballot(), "");
dassert (proposal.config.gpid == _primary_states.membership.gpid, "");
dassert (proposal.config.app_type == _primary_states.membership.app_type, "");
dassert (proposal.config.primary == _primary_states.membership.primary, "");
Expand Down
10 changes: 1 addition & 9 deletions src/apps/replication/lib/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,7 @@ void replica_stub::initialize(const replication_options& opts, configuration_ptr
it->second->get_ballot()
);

if (err != ERR_SUCCESS)
{
// prevent them to be primary, secondary, etc.
it->second->update_local_configuration_with_no_ballot_change(PS_ERROR);
}
else
{
it->second->set_inactive_state_transient(true);
}
it->second->set_inactive_state_transient(err == ERR_SUCCESS);
}

// start log serving
Expand Down

0 comments on commit 5e4335d

Please sign in to comment.