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

driver.BatchCursor Next returns true when first batch is empty

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.1.0
    • Core API
    • None

    Description

      The comment for driver.BatchCursor.Next(context.Context) says "This method will return false when an empty batch is returned." However, if the first batch is empty, it returns true. This ticket should make Next return false when bc.firstBatch is true and the batch is empty; this is the problematic code: https://github.com/mongodb/mongo-go-driver/blob/24c422eb6da5e148e55df79804a7058fa322979f/x/mongo/driver/batch_cursor.go#L167

      Attachments

        Activity

          People

            matthew.chiaravalloti@mongodb.com Matthew Chiaravalloti
            matthew.chiaravalloti@mongodb.com Matthew Chiaravalloti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: