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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.10
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • v4.4
    • 21

      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.)

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

              Created:
              Updated:
              Resolved: