storage_service: Add is_joined

This commit is contained in:
Asias He
2015-06-02 09:33:00 +08:00
parent ca2e151c03
commit 4dc4e54e50
2 changed files with 7 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ bool storage_service::should_bootstrap() {
}
future<> storage_service::prepare_to_join() {
if (!joined) {
if (!_joined) {
std::map<gms::application_state, gms::versioned_value> app_states;
#if 0
if (DatabaseDescriptor.isReplacing() && !(Boolean.parseBoolean(System.getProperty("cassandra.join_ring", "true"))))
@@ -89,9 +89,8 @@ future<> storage_service::prepare_to_join() {
future<> storage_service::join_token_ring(int delay) {
auto f = make_ready_future<>();
_joined = true;
#if 0
joined = true;
// We bootstrap if we haven't successfully bootstrapped before, as long as we are not a seed.
// If we are a seed, or if the user manually sets auto_bootstrap to false,
// we'll skip streaming data from other nodes and jump directly into the ring.

View File

@@ -129,7 +129,7 @@ private:
bool _initialized;
bool joined = false;
bool _joined = false;
#if 0
/* the probability for tracing any particular request, 0 disables tracing and 1 enables for all */
@@ -584,12 +584,11 @@ private:
Auth.setup();
}
}
public boolean isJoined()
{
return joined;
#endif
bool is_joined() {
return _joined;
}
#if 0
public void rebuild(String sourceDc)
{
logger.info("rebuild from dc: {}", sourceDc == null ? "(any dc)" : sourceDc);