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

unexpected EOF - large binary file (>1mb and <10mb)

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON

      Replicate this error -

      Create a zip file containing multiple files of different sizes which can come up to 10mb.

      Store that file as in a document

      something like:

      name: "hello" - string

      lifetime: 8943 - int

      config_file: Binary('...', 0) - zip is stored as binary format

       

      After uploading this and then using golang to marshal it into a struct:

      by using a base64 decoder and then using ioutil.ReadAll this successfully decodes and returns a list of bytes (the zip file represented in bytes). 

       

      Issue:

      Running this multiple times I've noticed it would fetch and decode successfully multiple times and rarely it would decode and report "unexpected EOF" error.

      I've run my own mongo instances used a json file that adds the document to the collection and then used golang to read the document.

       

      The json file is not changing it remains the same. Most of the time it works fine, and sometimes it fails.

        1. godriver2142_test.go
          1 kB
          Benji Rewis

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            pnaran@cryptoquantique.com punit naran
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: