[SERVER-32953] Log a deprecation warning when the maxScan find option is used. Created: 29/Jan/18  Updated: 29/Oct/23  Resolved: 14/Feb/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-11321 Docs for SERVER-32953: Log a deprecat... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-02-26
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 14/Feb/18 ]

Author:

{'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}

Message: SERVER-32953 Log a deprecation warning when the maxScan find option is used.
Branch: master
https://github.com/mongodb/mongo/commit/c0e27cd59345e219ece04c99c4b55a189a14d6cc

Comment by David Storch [ 30/Jan/18 ]

The stable dochub link (http://dochub.mongodb.org/core/4.0-deprecate-maxScan) has been created, so this work is unblocked.

Generated at Thu Feb 08 04:31:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.