Skip to content

MONGOID-5720 deprecate Criteria#max_scan#6140

Merged
jamis merged 1 commit intomongodb:masterfrom
jamis:5720-deprecate-max_scan
Apr 27, 2026
Merged

MONGOID-5720 deprecate Criteria#max_scan#6140
jamis merged 1 commit intomongodb:masterfrom
jamis:5720-deprecate-max_scan

Conversation

@jamis
Copy link
Copy Markdown
Contributor

@jamis jamis commented Apr 24, 2026

Criteria#max_scan is deprecated and will be removed in the next major version.

Copilot AI review requested due to automatic review settings April 24, 2026 22:23
@jamis jamis requested a review from a team as a code owner April 24, 2026 22:23
@jamis jamis requested a review from comandeo-mongo April 24, 2026 22:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Deprecates Criteria#max_scan in Mongoid’s query options DSL to reflect MongoDB’s deprecation/removal of the underlying server option and guide users toward max_time_ms.

Changes:

  • Adds YARD @deprecated documentation to max_scan.
  • Marks max_scan as deprecated via Mongoid.deprecate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 97 to +100
def max_scan(value = nil)
option(value) { |options| options.store(:max_scan, value) }
end
Mongoid.deprecate(self, :max_scan)
def max_scan(value = nil)
option(value) { |options| options.store(:max_scan, value) }
end
Mongoid.deprecate(self, :max_scan)
@jamis jamis merged commit 3e2471c into mongodb:master Apr 27, 2026
79 of 80 checks passed
@jamis jamis deleted the 5720-deprecate-max_scan branch April 27, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants