1
0
Fork 0

Fix syncCollectionFinalize to adjust to new async repl. API data format.

This commit is contained in:
Max Neunhoeffer 2016-06-10 10:38:27 +02:00
parent c6bf02a245
commit 2c6e5d9812
1 changed files with 4 additions and 4 deletions

View File

@ -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;