[CDRIVER-869] Driver should check for missing GridFS file chunks Created: 22/Sep/15  Updated: 08/Dec/15  Resolved: 20/Nov/15

Status: Closed
Project: C Driver
Component/s: GridFS
Affects Version/s: 1.2-rc0
Fix Version/s: 1.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: gridfs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Depends
depends on CDRIVER-871 Check return value of _mongoc_gridfs_... Closed
Related
is related to CDRIVER-895 Review GridFS errno behavior/document... Closed

 Description   

When reading/writing to a GridFS file, the driver should detect missing chunks and immediately exit with an appropriate error.



 Comments   
Comment by Githook User [ 20/Nov/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-869 report missing gridfs chunks
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/cd512ce367511020e3ce76a783ae54615d8633b3

Comment by Githook User [ 10/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #291 from ksuarz/CDRIVER-869

CDRIVER-869: check for missing GridFS chunks
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6fca474f03f6f3c956ad70700443d89c2f50bf87

Comment by Githook User [ 10/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #291 from ksuarz/CDRIVER-869

CDRIVER-869: check for missing GridFS chunks
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6fca474f03f6f3c956ad70700443d89c2f50bf87

Comment by Githook User [ 10/Oct/15 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}

Message: CDRIVER-869 check for missing gridfs chunks
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f3410ef26bfb9865308af7b6dfb1bfaef7102d97

Comment by Kyle Suarez [ 09/Oct/15 ]

If a chunk is detected missing, file->error needs to be set. This also needs to be tested when reading and writing files with missing GridFS chunks (the mock server might be useful for this).

Comment by Kyle Suarez [ 05/Oct/15 ]

As per the GridFS specification:

"As drivers stream the stored file they MUST check that each chunk received is the next expected chunk (i.e. it has the expected "n" value) and that the data field is of the expected length."

See https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst#file-download under the header "Implementation Details".

Generated at Wed Feb 07 21:10:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.