[GODRIVER-1012] Downloading big files from gridfs ends with ErrWrongSize Created: 01/May/19  Updated: 28/Oct/23  Resolved: 04/Jun/19

Status: Closed
Project: Go Driver
Component/s: GridFS
Affects Version/s: 1.0.1
Fix Version/s: 1.0.3

Type: Bug Priority: Major - P3
Reporter: Sławomir Chmiel Assignee: Emmanuel Eppinger (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongodb 3.6.12
ubuntu 18.04


Attachments: File main.go    
Issue Links:
Backports
backported by GODRIVER-1105 Backport "Downloading big files from ... Closed

 Description   

See attached main.go file:

  • it stored 3221225472 bytes of random data to the database
  • then it tries to load all those save data to see if the write size is equal to the read size
  • read ends at 3221176320 bytes with ErrWrongSize

Java client correctly reads all the data so it looks like the issue is in the GO DownloadStream. For smaller size, ~2GB it works fine - read ends with EOF and all data is read.



 Comments   
Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Emmanuel', 'email': 'manny.eppinger@mongodb.com', 'username': 'eppingere'}

Message: Fix GridFS ErrWrongSize error for big files

GODRIVER-1012

Change-Id: I695f6f08cf5e5bded9a6e4bcd36eff46d5e30742
Branch: release/1.0
https://github.com/mongodb/mongo-go-driver/commit/ff04022feed397df8d86b0750e069bb84f5b869d

Comment by Githook User [ 04/Jun/19 ]

Author:

{'name': 'Emmanuel', 'email': 'manny.eppinger@mongodb.com', 'username': 'eppingere'}

Message: Fix GridFS ErrWrongSize error for big files

GODRIVER-1012

Change-Id: I695f6f08cf5e5bded9a6e4bcd36eff46d5e30742
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/358eed79bd72b407d5db784a8b1cbd9f8f769ca4

Comment by Emmanuel Eppinger (Inactive) [ 03/Jun/19 ]

https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/456681

Generated at Thu Feb 08 08:35:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.