1
0
Fork 0

make role accessible during cluster startup

This commit is contained in:
Jan Steemann 2015-07-24 13:21:26 +02:00
parent 4ae6b54183
commit 74c83d2d5b
2 changed files with 6 additions and 4 deletions

View File

@ -65,6 +65,9 @@ require("org/arangodb");
// load the actions from the actions directory
require("org/arangodb/actions").startup();
// initialize AQL
require("org/arangodb/aql");
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------

View File

@ -879,8 +879,7 @@ var wait = function (data, shards) {
////////////////////////////////////////////////////////////////////////////////
var isCluster = function () {
return (typeof global.ArangoServerState !== "undefined" &&
global.ArangoServerState.initialised());
return (typeof global.ArangoServerState !== "undefined");
};
////////////////////////////////////////////////////////////////////////////////
@ -912,7 +911,7 @@ var role = function () {
////////////////////////////////////////////////////////////////////////////////
var status = function () {
if (! isCluster()) {
if (! isCluster() || ! global.ArangoServerState.initialised()) {
return undefined;
}
@ -936,7 +935,7 @@ var isCoordinatorRequest = function (req) {
////////////////////////////////////////////////////////////////////////////////
var handlePlanChange = function () {
if (! isCluster() || isCoordinator()) {
if (! isCluster() || isCoordinator() || ! global.ArangoServerState.initialised()) {
return;
}