mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
955f701b49
|
@ -1611,6 +1611,10 @@ static void parseReplaceAndUpdateOptions(
|
|||
if (optionsObject->Has(ReturnOldKey)) {
|
||||
options.returnOld = TRI_ObjectToBoolean(optionsObject->Get(ReturnOldKey));
|
||||
}
|
||||
TRI_GET_GLOBAL_STRING(IsRestoreKey);
|
||||
if (optionsObject->Has(IsRestoreKey)) {
|
||||
options.isRestore = TRI_ObjectToBoolean(optionsObject->Get(IsRestoreKey));
|
||||
}
|
||||
if (operation == TRI_VOC_DOCUMENT_OPERATION_UPDATE) {
|
||||
// intentionally not called for TRI_VOC_DOCUMENT_OPERATION_REPLACE
|
||||
TRI_GET_GLOBAL_STRING(KeepNullKey);
|
||||
|
@ -2220,6 +2224,10 @@ static void JS_InsertVocbaseCol(
|
|||
if (optionsObject->Has(ReturnNewKey)) {
|
||||
options.returnNew = TRI_ObjectToBoolean(optionsObject->Get(ReturnNewKey));
|
||||
}
|
||||
TRI_GET_GLOBAL_STRING(IsRestoreKey);
|
||||
if (optionsObject->Has(IsRestoreKey)) {
|
||||
options.isRestore = TRI_ObjectToBoolean(optionsObject->Get(IsRestoreKey));
|
||||
}
|
||||
} else {
|
||||
options.waitForSync = ExtractWaitForSync(args, optsIdx + 1);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ function agencyTestSuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSingleTopLevel : function () {
|
||||
wait(1);
|
||||
wait(2);
|
||||
assertEqual(readAndCheck([["/x"]]), [{}]);
|
||||
writeAndCheck([[{x:12}]]);
|
||||
assertEqual(readAndCheck([["/x"]]), [{x:12}]);
|
||||
|
@ -355,6 +355,7 @@ function agencyTestSuite () {
|
|||
leaderEndpoint = config.configuration.endpoints[config.leaderId].replace("tcp", "http");
|
||||
break;
|
||||
}
|
||||
wait(0.05);
|
||||
}
|
||||
} else {
|
||||
leaderEndpoint = agencyServers[0].replace("tcp", "http");
|
||||
|
|
|
@ -233,13 +233,13 @@ function syncCollectionFinalize(database, collname, collid, from, config) {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
coll.insert(entry.data);
|
||||
coll.insert(entry.data, {isRestore: true});
|
||||
return;
|
||||
}
|
||||
catch (err) {
|
||||
}
|
||||
try {
|
||||
coll.replace(entry.key, entry.data);
|
||||
coll.replace(entry.data._key, entry.data, {isRestore: true});
|
||||
} catch (errx) {
|
||||
console.error("syncCollectionFinalize: replace1", entry, errx);
|
||||
throw errx;
|
||||
|
@ -249,13 +249,13 @@ function syncCollectionFinalize(database, collname, collid, from, config) {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
coll.insert(entry.data._from, entry.data._to, entry.data);
|
||||
coll.insert(entry.data, {isRestore: true});
|
||||
return;
|
||||
}
|
||||
catch (err) {
|
||||
}
|
||||
try {
|
||||
coll.replace(entry.key, entry.data);
|
||||
coll.replace(entry.key, entry.data, {isRestore: true});
|
||||
} catch (errx) {
|
||||
console.error("syncCollectionFinalize: replace2", entry, errx);
|
||||
throw errx;
|
||||
|
|
|
@ -68,6 +68,7 @@ TRI_v8_global_s::TRI_v8_global_s(v8::Isolate* isolate)
|
|||
HttpOnlyKey(),
|
||||
IdKey(),
|
||||
InitTimeoutKey(),
|
||||
IsRestoreKey(),
|
||||
IsSystemKey(),
|
||||
IsVolatileKey(),
|
||||
JournalSizeKey(),
|
||||
|
@ -158,6 +159,7 @@ TRI_v8_global_s::TRI_v8_global_s(v8::Isolate* isolate)
|
|||
HttpOnlyKey.Reset(isolate, TRI_V8_ASCII_STRING("httpOnly"));
|
||||
IdKey.Reset(isolate, TRI_V8_ASCII_STRING("id"));
|
||||
InitTimeoutKey.Reset(isolate, TRI_V8_ASCII_STRING("initTimeout"));
|
||||
IsRestoreKey.Reset(isolate, TRI_V8_ASCII_STRING("isRestore"));
|
||||
IsSystemKey.Reset(isolate, TRI_V8_ASCII_STRING("isSystem"));
|
||||
IsVolatileKey.Reset(isolate, TRI_V8_ASCII_STRING("isVolatile"));
|
||||
JournalSizeKey.Reset(isolate, TRI_V8_ASCII_STRING("journalSize"));
|
||||
|
|
|
@ -712,6 +712,12 @@ typedef struct TRI_v8_global_s {
|
|||
|
||||
v8::Persistent<v8::String> InitTimeoutKey;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief "isRestore" key name
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
v8::Persistent<v8::String> IsRestoreKey;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief "isSystem" key name
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue