Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11321

Docs for SERVER-32953: Log a deprecation warning when the maxScan find option is used.

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Summary: maxScan is now maxTimeMS

      The maxScan option is intended to guard against runaway queries or unexpected bad query plans by limiting the number of keys that the IXSCAN query execution stage is willing to examine. However, this option has since been superseded by maxTimeMS. The maxTimeMS mechanism is more complete in that it applies to most commands, whereas maxScan is only available for find. Furthermore, maxScan can be easily be confused with limit. Limit is a logical component of the query language, whereas maxScan is better understood as a command directive in the vein of maxTimeMS, readConcern, writeConcern, readPreference, and so on.

      When maxScan is used, we should occasionally log the following message:

      Support for the maxScan option has been deprecated. Instead, use maxTimeMS. See http://dochub.mongodb.org/core/4.0-deprecate-maxScan.

      Scope of changes (files that need work and how much)

      • make sure the 4.0 compatibility page includes a mention to this.

      The following reference pages need to be updated to instruct the user to use maxTimeMS instead of maxScan.

      Consider adding content (new page or to an existing page) to explain how to add a time limit to a query, as per this note:

      Some users may also be interested in how to add a limit to a query; we've had users confuse maxScan and limit in the past.

      Impact to other docs outside of this product

      Resources (e.g. Scope Docs, Invision)

      ---------------------------------

      Documentation Request Summary:

      Users should be instructed to use maxTimeMS instead of maxScan. Some users may also be interested in how to add a limit to a query; we've had users confuse maxScan and limit in the past.

            Assignee:
            allison.moore@mongodb.com Allison Reinheimer Moore
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 years, 47 weeks, 6 days ago