Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1970

"InvalidOperationException: Sequence contains no elements" in MongoDB.Driver.GridFS.GridFSForwardOnlyDownloadStream`1.GetNextBatchFromCursor(Boolean hasMore)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • 2.4.2
    • 2.4.4
    • GridFS
    • OS : Windows Server 2008 R2
      Sharding Environment

    Description

      We are running load test with MongoDB V3.2.11 and below mentioned error is thrown when reading the binary file from GridFS.
      Size of binary file is 2 GB.

      Type:InvalidOperationException,Message:Sequence contains no elements
         場所 System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
         場所 MongoDB.Driver.GridFS.GridFSForwardOnlyDownloadStream`1.GetNextBatchFromCursor(Boolean hasMore)
         場所 MongoDB.Driver.GridFS.GridFSForwardOnlyDownloadStream`1.GetFirstBatch(CancellationToken cancellationToken)
         場所 MongoDB.Driver.GridFS.GridFSForwardOnlyDownloadStream`1.GetSegment(CancellationToken cancellationToken)
         場所 MongoDB.Driver.GridFS.GridFSForwardOnlyDownloadStream`1.Read(Byte[] buffer, Int32 offset, Int32 count)
      

      We are using below code for downloading the binary file

      documentBucket.OpenDownloadStream(file.Id, downloadOptions)
      

      Do you have any clue about above error?

      Thanks in advance.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            ummerirshadk@gmail.com Ummer Irshad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: