storage_service: Fix is_auto_bootstrap

Get the value from cfg option.
This commit is contained in:
Asias He
2015-09-07 16:21:03 +08:00
committed by Avi Kivity
parent 1157e6f119
commit f89a25562c
3 changed files with 4 additions and 4 deletions

View File

@@ -348,7 +348,7 @@ public:
/* Advanced properties */ \
/* Properties for advanced users or properties that are less commonly used. */ \
/* Advanced initialization properties */ \
val(auto_bootstrap, bool, true, Unused, \
val(auto_bootstrap, bool, true, Used, \
"This setting has been removed from default configuration. It makes new (non-seed) nodes automatically migrate the right data to themselves. When initializing a fresh cluster with no data, add auto_bootstrap: false.\n" \
"Related information: Initializing a multiple node cluster (single data center) and Initializing a multiple node cluster (multiple data centers)." \
) \

View File

@@ -61,9 +61,8 @@ bool is_replacing() {
return false;
}
bool is_auto_bootstrap() {
// FIXME: DatabaseDescriptor.isAutoBootstrap()
return true;
bool storage_service::is_auto_bootstrap() {
return _db.local().get_config().auto_bootstrap();
}
std::set<inet_address> get_seeds() {

View File

@@ -81,6 +81,7 @@ public:
void gossip_snitch_info();
private:
bool is_auto_bootstrap();
inet_address get_broadcast_address() {
return utils::fb_utilities::get_broadcast_address();
}