diff --git a/arangod/Cluster/ClusterInfo.cpp b/arangod/Cluster/ClusterInfo.cpp index 57074e68a8..eddfbf17aa 100644 --- a/arangod/Cluster/ClusterInfo.cpp +++ b/arangod/Cluster/ClusterInfo.cpp @@ -874,6 +874,7 @@ int ClusterInfo::createDatabaseCoordinator (string const& name, if (res._statusCode == triagens::rest::HttpResponse::PRECONDITION_FAILED) { return setErrormsg(TRI_ERROR_CLUSTER_DATABASE_NAME_EXISTS, errorMsg); } + return setErrormsg(TRI_ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN, errorMsg); } @@ -968,7 +969,7 @@ int ClusterInfo::dropDatabaseCoordinator (string const& name, string& errorMsg, return setErrormsg(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND, errorMsg); } - res = ac.removeValues("Plan/Collections/" + name, false); + res = ac.removeValues("Plan/Collections/" + name, true); if (! res.successful()) { return setErrormsg(TRI_ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN, @@ -980,6 +981,7 @@ int ClusterInfo::dropDatabaseCoordinator (string const& name, string& errorMsg, if (res._statusCode == rest::HttpResponse::NOT_FOUND) { return setErrormsg(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND, errorMsg); } + return setErrormsg(TRI_ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN, errorMsg); } diff --git a/arangod/Cluster/DBServerJob.h b/arangod/Cluster/DBServerJob.h index 3e39a5dbf0..84ba0d9fad 100644 --- a/arangod/Cluster/DBServerJob.h +++ b/arangod/Cluster/DBServerJob.h @@ -203,9 +203,14 @@ namespace triagens { TRI_ExecuteJavaScriptString(v8::Context::GetCurrent(), v8::String::New(content), v8::String::New(file), false); } + + // get the pointer to the least used vocbase + TRI_v8_global_t* v8g = (TRI_v8_global_t*) context->_isolate->GetData(); + void* orig = v8g->_vocbase; _applicationV8->exitContext(context); - TRI_ReleaseDatabaseServer(_server, vocbase); + + TRI_ReleaseDatabaseServer(_server, (TRI_vocbase_t*) orig); return true; } diff --git a/js/apps/system/aardvark/frontend/js/bootstrap/errors.js b/js/apps/system/aardvark/frontend/js/bootstrap/errors.js index b832fcf1ab..ce720002f0 100644 --- a/js/apps/system/aardvark/frontend/js/bootstrap/errors.js +++ b/js/apps/system/aardvark/frontend/js/bootstrap/errors.js @@ -123,8 +123,8 @@ "ERROR_CLUSTER_DATABASE_NAME_EXISTS" : { "code" : 1460, "message" : "database name already exists" }, "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN" : { "code" : 1461, "message" : "could not create database in plan" }, "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE" : { "code" : 1462, "message" : "could not create database" }, - "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" : { "code" : 1463, "message" : "could not remove databasefrom plan" }, - "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" : { "code" : 1464, "message" : "could not remove databasefrom current" }, + "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" : { "code" : 1463, "message" : "could not remove database from plan" }, + "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" : { "code" : 1464, "message" : "could not remove database from current" }, "ERROR_QUERY_KILLED" : { "code" : 1500, "message" : "query killed" }, "ERROR_QUERY_PARSE" : { "code" : 1501, "message" : "%s" }, "ERROR_QUERY_EMPTY" : { "code" : 1502, "message" : "query is empty" }, diff --git a/js/common/bootstrap/errors.js b/js/common/bootstrap/errors.js index b832fcf1ab..ce720002f0 100644 --- a/js/common/bootstrap/errors.js +++ b/js/common/bootstrap/errors.js @@ -123,8 +123,8 @@ "ERROR_CLUSTER_DATABASE_NAME_EXISTS" : { "code" : 1460, "message" : "database name already exists" }, "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN" : { "code" : 1461, "message" : "could not create database in plan" }, "ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE" : { "code" : 1462, "message" : "could not create database" }, - "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" : { "code" : 1463, "message" : "could not remove databasefrom plan" }, - "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" : { "code" : 1464, "message" : "could not remove databasefrom current" }, + "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN" : { "code" : 1463, "message" : "could not remove database from plan" }, + "ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT" : { "code" : 1464, "message" : "could not remove database from current" }, "ERROR_QUERY_KILLED" : { "code" : 1500, "message" : "query killed" }, "ERROR_QUERY_PARSE" : { "code" : 1501, "message" : "%s" }, "ERROR_QUERY_EMPTY" : { "code" : 1502, "message" : "query is empty" }, diff --git a/lib/BasicsC/errors.dat b/lib/BasicsC/errors.dat index 34da55e8c5..19f84543e3 100755 --- a/lib/BasicsC/errors.dat +++ b/lib/BasicsC/errors.dat @@ -158,8 +158,8 @@ ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_CURRENT,1459,"could not remove coll ERROR_CLUSTER_DATABASE_NAME_EXISTS,1460,"database name already exists","Will be raised when a coordinator in a cluster tries to create a database and the database name already exists." ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN,1461,"could not create database in plan","Will be raised when a coordinator in a cluster cannot create an entry for a new database in the Plan hierarchy in the agency." ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE,1462,"could not create database","Will be raised when a coordinator in a cluster notices that some DBServers report problems when creating databases for a new cluster wide database." -ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN,1463,"could not remove databasefrom plan","Will be raised when a coordinator in a cluster cannot remove an entry for a database in the Plan hierarchy in the agency." -ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT,1464,"could not remove databasefrom current","Will be raised when a coordinator in a cluster cannot remove an entry for a database in the Current hierarchy in the agency." +ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN,1463,"could not remove database from plan","Will be raised when a coordinator in a cluster cannot remove an entry for a database in the Plan hierarchy in the agency." +ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT,1464,"could not remove database from current","Will be raised when a coordinator in a cluster cannot remove an entry for a database in the Current hierarchy in the agency." ################################################################################ ## ArangoDB query errors diff --git a/lib/BasicsC/voc-errors.c b/lib/BasicsC/voc-errors.c index 7c1398954f..5bdce5bdc3 100644 --- a/lib/BasicsC/voc-errors.c +++ b/lib/BasicsC/voc-errors.c @@ -119,8 +119,8 @@ void TRI_InitialiseErrorMessages (void) { REG_ERROR(ERROR_CLUSTER_DATABASE_NAME_EXISTS, "database name already exists"); REG_ERROR(ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN, "could not create database in plan"); REG_ERROR(ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE, "could not create database"); - REG_ERROR(ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN, "could not remove databasefrom plan"); - REG_ERROR(ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT, "could not remove databasefrom current"); + REG_ERROR(ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN, "could not remove database from plan"); + REG_ERROR(ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT, "could not remove database from current"); REG_ERROR(ERROR_QUERY_KILLED, "query killed"); REG_ERROR(ERROR_QUERY_PARSE, "%s"); REG_ERROR(ERROR_QUERY_EMPTY, "query is empty"); diff --git a/lib/BasicsC/voc-errors.h b/lib/BasicsC/voc-errors.h index 4952609ab9..bdc4904b4a 100644 --- a/lib/BasicsC/voc-errors.h +++ b/lib/BasicsC/voc-errors.h @@ -274,10 +274,10 @@ extern "C" { /// Will be raised when a coordinator in a cluster notices that some /// DBServers report problems when creating databases for a new cluster wide /// database. -/// - 1463: @LIT{could not remove databasefrom plan} +/// - 1463: @LIT{could not remove database from plan} /// Will be raised when a coordinator in a cluster cannot remove an entry for /// a database in the Plan hierarchy in the agency. -/// - 1464: @LIT{could not remove databasefrom current} +/// - 1464: @LIT{could not remove database from current} /// Will be raised when a coordinator in a cluster cannot remove an entry for /// a database in the Current hierarchy in the agency. /// - 1500: @LIT{query killed} @@ -1605,7 +1605,7 @@ void TRI_InitialiseErrorMessages (void); //////////////////////////////////////////////////////////////////////////////// /// @brief 1463: ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN /// -/// could not remove databasefrom plan +/// could not remove database from plan /// /// Will be raised when a coordinator in a cluster cannot remove an entry for a /// database in the Plan hierarchy in the agency. @@ -1616,7 +1616,7 @@ void TRI_InitialiseErrorMessages (void); //////////////////////////////////////////////////////////////////////////////// /// @brief 1464: ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT /// -/// could not remove databasefrom current +/// could not remove database from current /// /// Will be raised when a coordinator in a cluster cannot remove an entry for a /// database in the Current hierarchy in the agency.