mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
b4883e69e4
|
@ -1651,13 +1651,11 @@ AgencyCommResult AgencyComm::sendWithFailover(
|
||||||
std::string endpoint;
|
std::string endpoint;
|
||||||
|
|
||||||
// transform location into an endpoint
|
// transform location into an endpoint
|
||||||
int offset;
|
int offset { 11 };
|
||||||
if (result.location().substr(0, 7) == "http://") {
|
if (result.location().substr(0, 7) == "http://") {
|
||||||
endpoint = "http+tcp://" + result.location().substr(7);
|
endpoint = "http+tcp://" + result.location().substr(7);
|
||||||
offset = 11;
|
|
||||||
} else if (result.location().substr(0, 8) == "https://") {
|
} else if (result.location().substr(0, 8) == "https://") {
|
||||||
endpoint = "ssl://" + result.location().substr(8);
|
endpoint = "http+ssl://" + result.location().substr(8);
|
||||||
offset = 6;
|
|
||||||
} else {
|
} else {
|
||||||
// invalid endpoint, return an error
|
// invalid endpoint, return an error
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -883,8 +883,8 @@ function runStressTest (options, command, testname) {
|
||||||
// / @brief executes a command, possible with valgrind
|
// / @brief executes a command, possible with valgrind
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function executeValgrind (cmd, args, options, valgrindTest) {
|
function executeArangod (cmd, args, options) {
|
||||||
if (valgrindTest && options.valgrind) {
|
if (options.valgrind) {
|
||||||
let valgrindOpts = {};
|
let valgrindOpts = {};
|
||||||
|
|
||||||
if (options.valgrindArgs) {
|
if (options.valgrindArgs) {
|
||||||
|
@ -1269,7 +1269,7 @@ function shutdownInstance (instanceInfo, options) {
|
||||||
// //////////////////////////////////////////////////////////////////////////////
|
// //////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function startInstanceCluster (instanceInfo, protocol, options,
|
function startInstanceCluster (instanceInfo, protocol, options,
|
||||||
addArgs, name, rootDir) {
|
addArgs, rootDir) {
|
||||||
let makeArgs = function (name, args) {
|
let makeArgs = function (name, args) {
|
||||||
args = args || options.extraArgs;
|
args = args || options.extraArgs;
|
||||||
|
|
||||||
|
@ -1279,7 +1279,7 @@ function startInstanceCluster (instanceInfo, protocol, options,
|
||||||
let subArgs = makeArgsArangod(options, fs.join(subDir, 'apps'));
|
let subArgs = makeArgsArangod(options, fs.join(subDir, 'apps'));
|
||||||
subArgs = Object.assign(subArgs, args);
|
subArgs = Object.assign(subArgs, args);
|
||||||
|
|
||||||
return [subArgs, name, subDir];
|
return [subArgs, subDir];
|
||||||
};
|
};
|
||||||
|
|
||||||
options.agencySize = 1;
|
options.agencySize = 1;
|
||||||
|
@ -1342,7 +1342,7 @@ function startInstanceCluster (instanceInfo, protocol, options,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function startArango (protocol, options, addArgs, name, rootDir, isAgency) {
|
function startArango (protocol, options, addArgs, rootDir, isAgency) {
|
||||||
const dataDir = fs.join(rootDir, 'data');
|
const dataDir = fs.join(rootDir, 'data');
|
||||||
const appDir = fs.join(rootDir, 'apps');
|
const appDir = fs.join(rootDir, 'apps');
|
||||||
|
|
||||||
|
@ -1389,7 +1389,7 @@ function startArango (protocol, options, addArgs, name, rootDir, isAgency) {
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceInfo.url = endpointToURL(instanceInfo.endpoint);
|
instanceInfo.url = endpointToURL(instanceInfo.endpoint);
|
||||||
instanceInfo.pid = executeValgrind(ARANGOD_BIN, toArgv(args), options, name).pid;
|
instanceInfo.pid = executeArangod(ARANGOD_BIN, toArgv(args), options).pid;
|
||||||
|
|
||||||
if (platform.substr(0, 3) === 'win') {
|
if (platform.substr(0, 3) === 'win') {
|
||||||
const procdumpArgs = [
|
const procdumpArgs = [
|
||||||
|
@ -1411,7 +1411,7 @@ function startArango (protocol, options, addArgs, name, rootDir, isAgency) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function startInstanceAgency (instanceInfo, protocol, options,
|
function startInstanceAgency (instanceInfo, protocol, options,
|
||||||
addArgs, testname, rootDir) {
|
addArgs, rootDir) {
|
||||||
const dataDir = fs.join(rootDir, 'data');
|
const dataDir = fs.join(rootDir, 'data');
|
||||||
|
|
||||||
const N = options.agencySize;
|
const N = options.agencySize;
|
||||||
|
@ -1446,7 +1446,7 @@ function startInstanceAgency (instanceInfo, protocol, options,
|
||||||
let dir = fs.join(rootDir, 'agency-' + i);
|
let dir = fs.join(rootDir, 'agency-' + i);
|
||||||
fs.makeDirectoryRecursive(dir);
|
fs.makeDirectoryRecursive(dir);
|
||||||
|
|
||||||
instanceInfo.arangods.push(startArango(protocol, options, instanceArgs, testname, rootDir, true));
|
instanceInfo.arangods.push(startArango(protocol, options, instanceArgs, rootDir, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceInfo.endpoint = instanceInfo.arangods[instanceInfo.arangods.length - 1].endpoint;
|
instanceInfo.endpoint = instanceInfo.arangods[instanceInfo.arangods.length - 1].endpoint;
|
||||||
|
@ -1457,8 +1457,8 @@ function startInstanceAgency (instanceInfo, protocol, options,
|
||||||
}
|
}
|
||||||
|
|
||||||
function startInstanceSingleServer (instanceInfo, protocol, options,
|
function startInstanceSingleServer (instanceInfo, protocol, options,
|
||||||
addArgs, testname, rootDir) {
|
addArgs, rootDir) {
|
||||||
instanceInfo.arangods.push(startArango(protocol, options, addArgs, testname, rootDir, false));
|
instanceInfo.arangods.push(startArango(protocol, options, addArgs, rootDir, false));
|
||||||
|
|
||||||
instanceInfo.endpoint = instanceInfo.arangods[instanceInfo.arangods.length - 1].endpoint;
|
instanceInfo.endpoint = instanceInfo.arangods[instanceInfo.arangods.length - 1].endpoint;
|
||||||
instanceInfo.url = instanceInfo.arangods[instanceInfo.arangods.length - 1].url;
|
instanceInfo.url = instanceInfo.arangods[instanceInfo.arangods.length - 1].url;
|
||||||
|
@ -1482,13 +1482,13 @@ function startInstance (protocol, options, addArgs, testname, tmpDir) {
|
||||||
}
|
}
|
||||||
else if (options.cluster) {
|
else if (options.cluster) {
|
||||||
startInstanceCluster(instanceInfo, protocol, options,
|
startInstanceCluster(instanceInfo, protocol, options,
|
||||||
addArgs, testname, rootDir);
|
addArgs, rootDir);
|
||||||
} else if (options.agency) {
|
} else if (options.agency) {
|
||||||
startInstanceAgency(instanceInfo, protocol, options,
|
startInstanceAgency(instanceInfo, protocol, options,
|
||||||
addArgs, testname, rootDir);
|
addArgs, rootDir);
|
||||||
} else {
|
} else {
|
||||||
startInstanceSingleServer(instanceInfo, protocol, options,
|
startInstanceSingleServer(instanceInfo, protocol, options,
|
||||||
addArgs, testname, rootDir);
|
addArgs, rootDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.cluster) {
|
if (!options.cluster) {
|
||||||
|
|
Loading…
Reference in New Issue