-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.3
-
Component/s: None
-
Environment:All
-
Empty show more show less
A pull request has been opened with a proposed fix and reproducing test here: https://github.com/mongodb/node-mongodb-native/pull/1154
This is an extremely severe bug in that it causes an uncaught thrown error emanating from the mongodb core (during the md5 sum recalculation) due to a corruption of the chunk numbering following a write of appended data.
The bug occurs when appending (write mode: "w+") to an existing non-zero length gridFS file with file length exactly equal to a multiple of its chunkSize. That is, when:
(file.length > 0) && ( file.length % file.chunkSize === 0 )