[SERVER-3448] btreecursor may do a lot of scanning in constructor or advance() Created: 19/Jul/11  Updated: 12/Jul/16  Resolved: 02/Aug/11

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 1.9.2

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

Added an iteration cutoff in BtreeCursor::skipAndCheck(), see below:

        /**
         * Attempt to locate the next btree key matching _bounds.  This may mean advancing to the
         * next successive key in the btree, or skipping (potentially multiple times in a single
         * function call) to a new position in the btree.  If an internal iteration cutoff is
         * reached before a matching key is found, then the search for a matching key will be
         * aborted.  This may leave the cursor pointing at a key that is not within bounds
         * (_bounds->matchesKey( currKey() ) may be false).  In that case,
         * _currentPossiblyOutOfBounds will be set to true.
         */
        void skipAndCheck();



 Comments   
Comment by auto [ 31/Jul/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-3448 prevent excessive scanning in BtreeCursor functions
Branch: master
https://github.com/mongodb/mongo/commit/10dd86fb966fc6cfa81c4337414ab9ad53ffda66

Generated at Thu Feb 08 03:03:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.