Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1013

When reading whole file at once next read doesn't return EOF

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.4
    • Affects Version/s: 1.0.1
    • Component/s: GridFS
    • None
    • Environment:
      mongodb 3.6.12
      ubuntu 18.04

      See attached main.go file:

      • it stored 1024 bytes of random data to the database
      • then it loads the whole file (all the 1024 bytes) at once
      • after that when calling Read on DownloadStream it returns 0 bytes read and no error
      • another call results with 0 bytes read and EOF error

      I would expect that second call of Read should return (0, EOF) as the first one already read all the data.

        1. main.go
          2 kB
          Sławomir Chmiel

            Assignee:
            manny.eppinger@mongodb.com Emmanuel Eppinger (Inactive)
            Reporter:
            schm Sławomir Chmiel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: