[CDRIVER-2566] Server error ignored during GridFS chunk upload Created: 23/Mar/18 Updated: 28/Oct/23 Resolved: 23/Jul/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | GridFS |
| Affects Version/s: | None |
| Fix Version/s: | 1.13.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Found by Jeroenooms, possible bug in the C Driver's GridFS implementation. Using a free mLab account, uploading a 3.5MB file silently fails. The fs.files document is written with "length" equal to one chunk (255k), and no chunk is written at all. The GridFS API appears to return a success, however. This seems related to mLab storage limits. Once we dropped the database, uploads worked correctly. Either: Jeroen, could you paste the C code that uploads a file and checks for error please? Update: #1 is correct. mongoc_gridfs_create_file_from_stream() ignores errors from mongoc_gridfs_file_writev while uploading chunks. I imagine that if an mLab user is too close to quota to save a chunk but still has space left for the fs.files record, that mongoc_gridfs_file_writev fails silently and mongoc_gridfs_file_save succeeds. |
| Comments |
| Comment by Githook User [ 23/Jul/18 ] | ||||||||||||||||||||
|
Author: {'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com'}Message: | ||||||||||||||||||||
| Comment by Jeroen Ooms [X] [ 23/Mar/18 ] | ||||||||||||||||||||
|
Below cleaned up code (removed R specific API calls). I am checking mongoc_gridfs_file_save() return value and even get a valid ID back.
|