Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2264

Recover from or prohibit partial bson reads

    XMLWordPrintable

Details

    • Improvement
    • Status: Backlog
    • Minor - P4
    • Resolution: Unresolved
    • None
    • bson-5.0.0
    • BSON
    • None

    Description

      Currently there are various bson decoding functions that may advance the read pointer in the byte buffer but ultimately raise an exception and thus fail to produce output. When this happens the byte buffer ends up in an unusable state as the read pointer could be pointing in the middle of a data structure.

      Either the read methods need to track the starting position in the byte buffer and reinstate it if an error or exception occurs, or they need to mark the byte buffer unusable upon encountering an error/exception via a flag which would prevent further decoding attempts on such byte buffer.

      Attachments

        Activity

          People

            Unassigned Unassigned
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: