Compare commits

..

No commits in common. "6b5139ebaae770b7c212c796405c6bcfd0db3e37" and "f08d066d826f4f29705f944a6687b919a5a36e56" have entirely different histories.

1 changed files with 6 additions and 19 deletions

View File

@ -1045,13 +1045,9 @@ class MongoClientInterface {
const c = this.getCollection(bucketName);
let vFormat = null;
// Function to process each document
const processDoc = (doc, objName, params, key, cb) => {
const processDoc = (doc, objName, params, cb) => {
if (!doc && params && params.versionId) {
return cb(null, {
doc: null,
versionId: params.versionId,
key,
});
return cb(errors.NoSuchKey);
}
// If no master found then object is either non existent
// or last version is delete marker
@ -1060,19 +1056,11 @@ class MongoClientInterface {
if (err && !err.is.NoSuchKey) {
return cb(err);
}
return cb(null, {
doc: doc || null,
versionId: params.versionId,
key,
});
return cb(null, doc || null);
});
}
MongoUtils.unserialize(doc.value);
return cb(null, {
doc: doc.value,
versionId: params.versionId,
key,
});
return cb(null, doc.value);
};
this.getBucketVFormat(bucketName, log, (err, _vFormat) => {
if (err) {
@ -1100,7 +1088,7 @@ class MongoClientInterface {
// Process each document using associated context (objName, params)
async.mapLimit(keysAndObjects, 5, ({ key, objName, params }, cb) => {
const doc = docByKey.get(key);
processDoc(doc, objName, params, key, cb);
processDoc(doc, objName, params, cb);
}, callback);
}).catch(err => {
callback(err);
@ -1495,8 +1483,7 @@ class MongoClientInterface {
* @param {object} [params] request params
* @return {undefined}
*/
internalDeleteObject(collection, bucketName, key, filter, log, cb, originOp = 's3:ObjectRemoved:Delete',
params = null) {
internalDeleteObject(collection, bucketName, key, filter, log, cb, originOp = 's3:ObjectRemoved:Delete', params = null) {
// filter used when deleting object
const deleteFilter = Object.assign({
_id: key,