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

Running a FindAll which returns more than 16KB of results causes an error.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      IIS 7, .Net 4, Windows 7 64 bit.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This works fine with result sets up to around 16KB. I notice that BsonBuffer.chunkSize is set to 16KB, seems likely to be related? See the following stack trace issued when trying to create a new list from a FindAll query:

      [EndOfStreamException: Not enough input bytes available]
      MongoDB.BsonLibrary.IO.BsonBuffer.EnsureDataAvailable(Int32 needed) +159
      MongoDB.BsonLibrary.IO.BsonBuffer.ReadString() +217
      MongoDB.BsonLibrary.IO.BsonBinaryReader.ReadString(String& name) +299
      MongoDB.BsonLibrary.BsonElement.ReadFrom(BsonReader bsonReader, BsonElement& element) +422
      MongoDB.BsonLibrary.BsonDocument.Deserialize(BsonReader bsonReader) +111
      MongoDB.BsonLibrary.BsonDocument.ReadFrom(BsonReader bsonReader) +119
      MongoDB.BsonLibrary.BsonElement.ReadFrom(BsonReader bsonReader, BsonElement& element) +550
      MongoDB.BsonLibrary.BsonDocument.Deserialize(BsonReader bsonReader) +111
      MongoDB.BsonLibrary.BsonDocument.ReadFrom(BsonReader bsonReader) +119
      MongoDB.BsonLibrary.BsonElement.ReadFrom(BsonReader bsonReader, BsonElement& element) +550
      MongoDB.BsonLibrary.BsonDocument.Deserialize(BsonReader bsonReader) +111
      MongoDB.BsonLibrary.BsonDocument.ReadFrom(BsonReader bsonReader) +119
      MongoDB.BsonLibrary.Serialization.BsonSerializer.Deserialize(BsonReader bsonReader, Type type) +130
      MongoDB.BsonLibrary.Serialization.BsonSerializer.Deserialize(BsonReader bsonReader) +110
      MongoDB.CSharpDriver.Internal.MongoReplyMessage`1.ReadFrom(BsonBuffer buffer) +1119
      MongoDB.CSharpDriver.Internal.MongoConnection.ReceiveMessage() +470
      MongoDB.CSharpDriver.MongoCursorEnumerator.GetReply(MongoRequestMessage message) +262
      MongoDB.CSharpDriver.MongoCursorEnumerator.GetFirst() +937
      MongoDB.CSharpDriver.MongoCursorEnumerator.MoveNext() +260
      System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +472

        1. csharp71.bson
          3 kB
        2. json-with-docarray.txt
          5 kB

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            barrydahlberg Barry Dahlberg
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None