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

JsonBuffer can exhaust memory

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2
    • Component/s: Json
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The JsonBuffer class, when wrapping a TextReader, will consume memory equal to the total number of characters consumed from the TextReader. This could cause problems in several scenarios:

      • A mongoimport-like scenario, where a single file contains many JSON documents and a single JsonReader is used to read them all
      • A really large JSON document (though in most situations you'd need space proportional to the size of the document anyway)

            Assignee:
            Unassigned Unassigned
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: