Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30633

MongoDB queryAndFetch should not timeout on counting match

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021.0
    • Fix Version/s: 10.10-HF54, 2021.11
    • Component/s: Core MongoDB
    • Upgrade notes:
      Hide

      MongoDB query will now return with a total count of -2 when it cannot be computed within the MongoDB socket time out (likely because there are too many results to be fetch within the timeout)

      Show
      MongoDB query will now return with a total count of -2 when it cannot be computed within the MongoDB socket time out (likely because there are too many results to be fetch within the timeout)
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #47
    • Story Points:
      5

      Description

      When the countUpTo parameter is set -1 we are asking to count the exact number of matches.
      This is a performance problem when matching lots of results even if the main query is limited to a page of 40 docs, as a result, the count query is going to raise a socket timeout after 1min.

      A possible solution is to always set a count limit so countUpTo=-1 is translated to countUpTo=10000.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: