Meteor-Community-Packages / Meteor-CollectionFS

Reactive file manager for Meteor
MIT License
1.05k stars 237 forks source link

Missing copies and chunkId property as well as the chunk itself on db.cfs.attachments.filerecord entries, happens randomly #1039

Open Gobliins opened 5 years ago

Gobliins commented 5 years ago

Sometimes (unfortunately i can't describe it more precisely and also can't reprodruce it) the following happens:

When uploading a file: a filerecord is created but the property copies (where also the key to the document data inside the chunks is) is missing. So i checked if there was anything uploaded in the chunks collection but nothing was there as well.

The Collection which uses GridFS (from Wekan):

Attachments = new FS.Collection('attachments', {
  stores: [

    // XXX Add a new store for cover thumbnails so we don't load big images in
    // the general board view
    new FS.Store.GridFS('attachments'),
  ],
});

FileRecord Entry looks like this (the property key with the chunkId and also the chunk itself is missing):

{ "_id" : "JkZdzjyG5wezhLy5m", "original" : { "name" : "picture.png", "updatedAt" : ISODate("2018-09-11T09:19:39.145Z"), "size" : 2764, "type" : "image/png" }, "boardId" : "FromUs", "cardId" : "FromUs", "userId" : "FromUs" }

This happens very rarely to certain times, on different systems with different users. It then fixes itself even without restarting the app or anything at all.

Has some experienced this issue as well? Or can think of something why it happens? (somehow i think of asynchronous code execution, but this is only a wild guess)