1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/ArangoDB into v8_subsubmodule

This commit is contained in:
Wilfried Goesgens 2017-02-01 10:43:34 +01:00
commit 27956ce71f
6 changed files with 62 additions and 10 deletions

View File

@ -1515,6 +1515,8 @@ int ClusterInfo::ensureIndexCoordinator(
if (idxSlice.isString()) {
// use predefined index id
iid = arangodb::basics::StringUtils::uint64(idxSlice.copyString());
} else if (idxSlice.isNumber()) {
iid = idxSlice.getNumber<uint64_t>();
}
if (iid == 0) {

View File

@ -105,11 +105,24 @@ HeartbeatThread::~HeartbeatThread() { shutdown(); }
class HeartbeatBackgroundJob {
std::shared_ptr<HeartbeatThread> _heartbeatThread;
double _startTime;
std::string _schedulerInfo;
public:
explicit HeartbeatBackgroundJob(std::shared_ptr<HeartbeatThread> hbt)
: _heartbeatThread(hbt) {}
explicit HeartbeatBackgroundJob(std::shared_ptr<HeartbeatThread> hbt,
double startTime)
: _heartbeatThread(hbt), _startTime(startTime) {
_schedulerInfo = SchedulerFeature::SCHEDULER->infoStatus();
}
void operator()() {
double now = TRI_microtime();
if (now > _startTime + 5.0) {
LOG_TOPIC(ERR, Logger::HEARTBEAT) << "ALARM: Scheduling background job "
"took " << now - _startTime
<< " seconds, scheduler info at schedule time: " << _schedulerInfo
<< ", scheduler info now: "
<< SchedulerFeature::SCHEDULER->infoStatus();
}
_heartbeatThread->runBackgroundJob();
}
};
@ -138,7 +151,8 @@ void HeartbeatThread::runBackgroundJob() {
jobNr = ++_backgroundJobsPosted;
LOG_TOPIC(DEBUG, Logger::HEARTBEAT) << "dispatching sync tail " << jobNr;
_launchAnotherBackgroundJob = false;
_ioService->post(HeartbeatBackgroundJob(shared_from_this()));
_ioService->post(HeartbeatBackgroundJob(shared_from_this(),
TRI_microtime()));
} else {
_backgroundJobScheduledOrRunning = false;
_launchAnotherBackgroundJob = false;
@ -790,7 +804,7 @@ void HeartbeatThread::syncDBServerStatusQuo() {
uint64_t jobNr = ++_backgroundJobsPosted;
LOG_TOPIC(DEBUG, Logger::HEARTBEAT) << "dispatching sync " << jobNr;
_backgroundJobScheduledOrRunning = true;
_ioService->post(HeartbeatBackgroundJob(shared_from_this()));
_ioService->post(HeartbeatBackgroundJob(shared_from_this(), TRI_microtime()));
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -286,7 +286,7 @@ int MMFilesIndexFactory::enhanceIndexDefinition(VPackSlice const definition,
id = basics::StringUtils::uint64(current.copyString());
}
if (id > 0) {
enhanced.add("id", VPackValue(id));
enhanced.add("id", VPackValue(std::to_string(id)));
}

View File

@ -0,0 +1,25 @@
[database]
auto-upgrade = false
upgrade-check = false
[server]
rest-server = false
authentication = false
# username = root
# password =
statistics = false
# set number of threads to 1 so we don't have concurrency
threads = 1
[javascript]
startup-directory = ./js
app-path = ./js/apps
script = ./js/server/arango-dfdb.js
v8-contexts = 1
[foxx]
queues = false
[log]
level = info

View File

@ -0,0 +1,11 @@
[console]
pretty-print = true
[server]
authentication = false
# username = root
# password =
[javascript]
startup-directory = ./js
execute-string = require("@arangodb/foxx/manager").run(ARGUMENTS);

View File

@ -2766,7 +2766,7 @@ testFuncs.config = function (options) {
testFuncs.dfdb = function (options) {
const dataDir = fs.getTempFile();
const args = ['-c', 'etc/relative/arango-dfdb.conf', dataDir];
const args = ['-c', 'etc/testing/arango-dfdb.conf', dataDir];
fs.makeDirectoryRecursive(dataDir);
let results = {};
@ -2971,12 +2971,12 @@ testFuncs.foxx_manager = function (options) {
let results = {};
results.update = runArangoshCmd(options, instanceInfo, {
'configuration': 'etc/relative/foxx-manager.conf'
'configuration': 'etc/testing/foxx-manager.conf'
}, ['update']);
if (results.update.status === true || options.force) {
results.search = runArangoshCmd(options, instanceInfo, {
'configuration': 'etc/relative/foxx-manager.conf'
'configuration': 'etc/testing/foxx-manager.conf'
}, ['search', 'itzpapalotl']);
}
@ -4378,7 +4378,7 @@ exports.unitTestPrettyPrintResults = unitTestPrettyPrintResults;
// }
// var results = {}
// results.install = runArangoshCmd(options, instanceInfo, {
// "configuration": "etc/relative/foxx-manager.conf"
// "configuration": "etc/testing/foxx-manager.conf"
// }, [
// "install",
// "js/common/test-data/apps/queue-legacy-test",
@ -4473,7 +4473,7 @@ exports.unitTestPrettyPrintResults = unitTestPrettyPrintResults;
// results.final.duration = time() - startTime
// results.uninstall = runArangoshCmd(options, instanceInfo, {
// "configuration": "etc/relative/foxx-manager.conf"
// "configuration": "etc/testing/foxx-manager.conf"
// }, [
// "uninstall",
// queueAppMountPath