mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
8f14a9b790
|
@ -1,5 +1,14 @@
|
||||||
v1.1.beta3 (XXXX-XX-XX)
|
v1.1.beta3 (XXXX-XX-XX)
|
||||||
|
|
||||||
|
* WARNING:
|
||||||
|
arangod now performs a database version check at startup. It will look for a file
|
||||||
|
named "VERSION" in its database directory. If the file is not present, arangod will
|
||||||
|
refuse to start and ask the user to run arango-upgrade first. If the VERSION file
|
||||||
|
is present but is from an older version of ArangoDB, arangod will also refuse to
|
||||||
|
start and ask the user to run the upgrade script first. This procedure shall ensure
|
||||||
|
that users have full control over when they perform any updates/upgrades of their
|
||||||
|
data, and do not risk running an incompatible server/database state tandem.
|
||||||
|
|
||||||
* fixed issue #283: AQL LENGTH() now works on documents, too
|
* fixed issue #283: AQL LENGTH() now works on documents, too
|
||||||
|
|
||||||
* fixed issue #281: documentation for skip lists shows wrong example
|
* fixed issue #281: documentation for skip lists shows wrong example
|
||||||
|
|
|
@ -691,6 +691,8 @@ bool ApplicationV8::prepareV8Instance (const size_t i) {
|
||||||
|
|
||||||
|
|
||||||
if (i == 0 && _runVersionCheck) {
|
if (i == 0 && _runVersionCheck) {
|
||||||
|
LOGGER_DEBUG << "running database version check";
|
||||||
|
|
||||||
const string script = _startupLoader.buildScript(JS_server_version_check);
|
const string script = _startupLoader.buildScript(JS_server_version_check);
|
||||||
|
|
||||||
// special check script to be run just once in first thread (not in all)
|
// special check script to be run just once in first thread (not in all)
|
||||||
|
@ -709,6 +711,8 @@ bool ApplicationV8::prepareV8Instance (const size_t i) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGGER_DEBUG << "database version check passed";
|
||||||
}
|
}
|
||||||
|
|
||||||
// load all actions
|
// load all actions
|
||||||
|
|
|
@ -58,8 +58,12 @@ function main (argv) {
|
||||||
var versionInfo = SYS_READ(versionFile);
|
var versionInfo = SYS_READ(versionFile);
|
||||||
if (versionInfo != '') {
|
if (versionInfo != '') {
|
||||||
var versionValues = JSON.parse(versionInfo);
|
var versionValues = JSON.parse(versionInfo);
|
||||||
lastVersion = parseFloat(versionValues.version);
|
if (versionValues && versionValues.version && ! isNaN(versionValues.version)) {
|
||||||
lastTasks = versionValues.tasks;
|
lastVersion = parseFloat(versionValues.version);
|
||||||
|
}
|
||||||
|
if (versionValues && versionValues.tasks && typeof(versionValues.tasks) === 'object') {
|
||||||
|
lastTasks = versionValues.tasks || { };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,14 @@
|
||||||
var versionInfo = SYS_READ(versionFile);
|
var versionInfo = SYS_READ(versionFile);
|
||||||
if (versionInfo != '') {
|
if (versionInfo != '') {
|
||||||
var versionValues = JSON.parse(versionInfo);
|
var versionValues = JSON.parse(versionInfo);
|
||||||
lastVersion = parseFloat(versionValues.version);
|
if (versionValues && versionValues.version && ! isNaN(versionValues.version)) {
|
||||||
|
lastVersion = parseFloat(versionValues.version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastVersion == null) {
|
||||||
|
console.error("No version information file found in database directory.");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentServerVersion = VERSION.match(/^(\d+\.\d+).*$/);
|
var currentServerVersion = VERSION.match(/^(\d+\.\d+).*$/);
|
||||||
|
@ -67,7 +74,8 @@
|
||||||
|
|
||||||
if (lastVersion != null && lastVersion > currentVersion) {
|
if (lastVersion != null && lastVersion > currentVersion) {
|
||||||
// downgrade??
|
// downgrade??
|
||||||
console.warn("Database directory version is higher than server version. This seems like you are running arangodb on a database directory that was created with a newer version. This is not supported.");
|
console.error("Database directory version is higher than server version.");
|
||||||
|
console.error("It seems like you are running arangodb on a database directory that was created with a newer version. This is not supported.");
|
||||||
// still, allow the start
|
// still, allow the start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue