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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Linked BF Score:
      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

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

                Dates

                Created:
                Updated:
                Resolved: