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

Use isEmpty instead of numRecords to check if there are any documents left in a collection

    • Fully Compatible
    • ALL
    • Execution Team 2021-06-28
    • 15

      We use Collection::numRecords here to check if there are any more documents. Due to the unreliability of Collection::numRecords (see BF-20792 for more details), we should replace the check with Collection::isEmpty.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            jason.zhang@mongodb.com Jason Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: