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

Commit

Permalink
remove functions useless in class replica (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Tao authored Dec 1, 2018
1 parent 808c7ad commit d03071d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions src/dist/replication/lib/replica.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,6 @@ mutation_ptr replica::new_mutation(decree decree)
return mu;
}

bool replica::group_configuration(/*out*/ partition_configuration &config) const
{
if (partition_status::PS_PRIMARY != status())
return false;

config = _primary_states.membership;
return true;
}

decree replica::last_durable_decree() const { return _app->last_durable_decree(); }

decree replica::last_flushed_decree() const { return _app->last_flushed_decree(); }
Expand Down
4 changes: 0 additions & 4 deletions src/dist/replication/lib/replica.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class replica : public serverlet<replica>, public ref_counter, public replica_ba
//
// routine for testing purpose only
//
void send_group_check_once_for_test(int delay_milliseconds);
void inject_error(error_code err);

//
Expand All @@ -142,10 +141,7 @@ class replica : public serverlet<replica>, public ref_counter, public replica_ba
decree last_durable_decree() const;
decree last_flushed_decree() const;
const std::string &dir() const { return _dir; }
bool group_configuration(/*out*/ partition_configuration &config) const;
uint64_t create_time_milliseconds() const { return _create_time_ms; }
uint64_t last_config_change_time_milliseconds() const { return _last_config_change_time_ms; }
uint64_t last_checkpoint_generate_time_ms() const { return _last_checkpoint_generate_time_ms; }
const char *name() const { return replica_name(); }
mutation_log_ptr private_log() const { return _private_log; }
const replication_options *options() const { return _options; }
Expand Down
13 changes: 0 additions & 13 deletions src/dist/replication/lib/replica_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,6 @@ void replica::on_group_check_reply(error_code err,
}
}

// for testing purpose only
void replica::send_group_check_once_for_test(int delay_milliseconds)
{
dassert(_options->group_check_disabled, "");

_primary_states.group_check_task =
tasking::enqueue(LPC_GROUP_CHECK,
&_tracker,
[this] { broadcast_group_check(); },
get_gpid().thread_hash(),
std::chrono::milliseconds(delay_milliseconds));
}

void replica::inject_error(error_code err)
{
tasking::enqueue(LPC_REPLICATION_ERROR,
Expand Down

0 comments on commit d03071d

Please sign in to comment.