mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
9fd39ed804
|
@ -46,7 +46,7 @@ Bottom=130
|
|||
State=1
|
||||
|
||||
[Field 6]
|
||||
Type=Text
|
||||
Type=Password
|
||||
Text=
|
||||
Left=5
|
||||
Right=60
|
||||
|
|
|
@ -808,7 +808,13 @@ Section "-Core installation"
|
|||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
|
||||
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("ARANGODB_DEFAULT_ROOT_PASSWORD", "$PASSWORD").r0'
|
||||
StrCmp $0 0 error
|
||||
ExecWait "$INSTDIR\bin\arangod.exe --database.init-database"
|
||||
Goto done
|
||||
error:
|
||||
MessageBox MB_OK "Failed to initialize database password."
|
||||
done:
|
||||
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
|
||||
StrCmp $TRI_INSTALL_TYPE 'Service' 0 nothing
|
||||
SimpleSC::StopService '${TRI_SVC_NAME}' 0 30
|
||||
|
|
|
@ -91,6 +91,11 @@ TransactionContext::~TransactionContext() {
|
|||
// If some external entity is still using the ditch, it is kept!
|
||||
}
|
||||
|
||||
// free all VPackBuilders we handed out
|
||||
for (auto& it : _builders) {
|
||||
delete it;
|
||||
}
|
||||
|
||||
if (_ownsResolver) {
|
||||
delete _resolver;
|
||||
}
|
||||
|
|
|
@ -238,7 +238,12 @@ function syncCollectionFinalize(database, collname, collid, from, config) {
|
|||
}
|
||||
catch (err) {
|
||||
}
|
||||
coll.replace(entry.key, entry.data);
|
||||
try {
|
||||
coll.replace(entry.key, entry.data);
|
||||
} catch (errx) {
|
||||
console.error("syncCollectionFinalize: replace1", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else if (entry.type === mType.REPLICATION_MARKER_EDGE) {
|
||||
if (tryPostpone(entry)) {
|
||||
return;
|
||||
|
@ -249,12 +254,22 @@ function syncCollectionFinalize(database, collname, collid, from, config) {
|
|||
}
|
||||
catch (err) {
|
||||
}
|
||||
coll.replace(entry.key, entry.data);
|
||||
try {
|
||||
coll.replace(entry.key, entry.data);
|
||||
} catch (errx) {
|
||||
console.error("syncCollectionFinalize: replace2", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else if (entry.type === mType.REPLICATION_MARKER_REMOVE) {
|
||||
if (tryPostpone(entry)) {
|
||||
return;
|
||||
}
|
||||
coll.remove(entry.key);
|
||||
try {
|
||||
coll.remove(entry.key);
|
||||
} catch (errx) {
|
||||
console.error("syncCollectionFinalize: remove", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else if (entry.type === mType.REPLICATION_TRANSACTION_START) {
|
||||
transactions[entry.tid] = [];
|
||||
} else if (entry.type === mType.REPLICATION_TRANSACTION_COMMIT) {
|
||||
|
@ -268,11 +283,26 @@ function syncCollectionFinalize(database, collname, collid, from, config) {
|
|||
} else if (entry.type === mType.REPLICATION_TRANSACTION_ABORT) {
|
||||
delete transactions[entry.tid];
|
||||
} else if (entry.type === mType.REPLICATION_INDEX_CREATE) {
|
||||
coll.ensureIndex(entry.index);
|
||||
try {
|
||||
coll.ensureIndex(entry.index);
|
||||
} catch(errx) {
|
||||
console.error("syncCollectionFinalize: ensureIndex", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else if (entry.type === mType.REPLICATION_INDEX_DROP) {
|
||||
coll.dropIndex(entry.id);
|
||||
try {
|
||||
coll.dropIndex(entry.id);
|
||||
} catch(errx) {
|
||||
console.error("syncCollectionFinalize: dropIndex", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else if (entry.type === mType.REPLICATION_COLLECTION_CHANGE) {
|
||||
coll.properties(entry.collection);
|
||||
try {
|
||||
coll.properties(entry.collection);
|
||||
} catch(errx) {
|
||||
console.error("syncCollectionFinalize: properties", entry, errx);
|
||||
throw errx;
|
||||
}
|
||||
} else {
|
||||
// all else, including dropping and creating the collection
|
||||
throw "Found collection drop, create or rename marker.";
|
||||
|
|
Loading…
Reference in New Issue