From 12a9b8db46b50f76c2be37dbcf07f520c9deb487 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 20 Feb 2014 15:48:13 +0100 Subject: [PATCH] feature #2731: Datastores with ID < 100 can now be removed or added to a cluster --- src/cluster/Cluster.cc | 13 +------------ src/datastore/DatastorePool.cc | 8 -------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/cluster/Cluster.cc b/src/cluster/Cluster.cc index fbdeee4311..451204766e 100644 --- a/src/cluster/Cluster.cc +++ b/src/cluster/Cluster.cc @@ -118,18 +118,7 @@ string& Cluster::get_ds_location(string &ds_location) int Cluster::add_datastore(int id, Datastore::DatastoreType ds_type, string& error_msg) { - if ( id == DatastorePool::SYSTEM_DS_ID ) - { - ostringstream oss; - oss << "Datastore "<< DatastorePool::SYSTEM_DS_ID - << " cannot be added to any cluster."; - - error_msg = oss.str(); - - return -1; - } - - int rc = datastores.add_collection_id(id); + int rc = datastores.add_collection_id(id); if ( rc < 0 ) { diff --git a/src/datastore/DatastorePool.cc b/src/datastore/DatastorePool.cc index da7de7c8c7..27d81c2485 100644 --- a/src/datastore/DatastorePool.cc +++ b/src/datastore/DatastorePool.cc @@ -241,14 +241,6 @@ int DatastorePool::drop(PoolObjectSQL * objsql, string& error_msg) int rc; - // Return error if the datastore is a default one. - if( datastore->get_oid() < 100 ) - { - error_msg = "System Datastores (ID < 100) cannot be deleted."; - NebulaLog::log("DATASTORE", Log::ERROR, error_msg); - return -2; - } - if( datastore->get_collection_size() > 0 ) { ostringstream oss;