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

Using a ReaderIterator, the current element holds onto the previous Document

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • 0.0.11
    • BSON

    Description

      When calling iterator.Next(), it does not clear out the document of the value.  Simply doing the following should be sufficient:

      itr.elem.value.d = nil
      

      The side effect this has if for values that use the document (.d) like subdocuments and arrays, if you have multiples in the source (reader), it'll never update to the current element since the previous value was already set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ryan.hullah@bluemedora.com Ryan Hullah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: