Calling any Enumerable method on mongo context exhausts query

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 5.1.6, 6.0.3
    • Affects Version/s: 5.1.5
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If you have a huge collection, with maybe 1,000,000 documents in it, and you call, for example, Document.unscoped.any?, the whole collection will be loaded in memory.

      The main reason why I see this as a bug, is that the issue is not present in 5.1.4. I am not sure what exactly happens, but 5.1.4 will instantly return with the correct value. Unfortunately, it is not the case anymore with 5.1.5.

              Assignee:
              Emily Stolfo (Inactive)
              Reporter:
              Sylvain Bernier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: