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

DownloadStream.Skip() does not handle multiple chunks correctly

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.5, 1.4.6
    • Affects Version/s: None
    • Component/s: None
    • None

      DownloadStream.Skip() does not seem to skip correctly when iterating over multiple chunks. The test cases here identify two cases:

      https://play.golang.org/p/z7RDRqU01ZA

      1. Skipping less than chunk size if the buffer offset is 0 results in a no-op.
      2. When skipping results in the buffer offset being divisible by the chunk size on the last loop iteration in Skip, it resets the offset but does not fill the next buffer.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: