Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54825

Use 'toArray()' in addition to array access after 'find()' in rslib.js

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0, 4.4.10
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • 21

    Description

      If we use coll.find().toArray()[0] instead of just coll.find()[0] then we will be able to catch the CappedPositionLost error as expected in getFirstOplogEntry().

      (This doesn't solve the direct cause of the bug in the linked ticket, but it will avoid the bug in the future.)

      Attachments

        Issue Links

          Activity

            People

              hartek.sabharwal@mongodb.com Hartek Sabharwal
              hana.pearlman@mongodb.com Hana Pearlman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: