willholley opened a new pull request #807: Avoid duplicate index selection in Mango URL: https://github.com/apache/couchdb/pull/807 <!-- Thank you for your contribution! Please file this form by replacing the Markdown comments with your text. If a section needs no action - remove it. Also remember, that CouchDB uses the Review-Then-Commit (RTC) model of code collaboration. Positive feedback is represented +1 from committers and negative is a -1. The -1 also means veto, and needs to be addressed to proceed. Once there are no objections, the PR can be merged by a CouchDB committer. See: http://couchdb.apache.org/bylaws.html#decisions for more info. --> ## Overview Previously, index selection for a given query was run twice for each request - once to add a warning in case a full database scan would be performed and then again when the query was executed. This moves the warning generation so that it occurs at the end of the query processing and we can use the existing index context to decide whether to add a warning or not. Whilst only a minor optimisation (which also assumes we don't have cached query plans etc), it at least moves index selection to where one might expect it to happen i.e. during query planning. ## Testing recommendations <!-- Describe how we can test your changes. Does it provides any behaviour that the end users could notice? --> Added a unit test to cover that a warning is appropriately generated. The text index tests should also be run manually. ## GitHub issue number <!-- If this is a significant change, please file a separate issue at: https://github.com/apache/couchdb/issues and include the number here and in commit message(s) using syntax like "Fixes #472" or "Fixes apache/couchdb#472". --> ## Related Pull Requests <!-- If your changes affects multiple components in different repositories please put links to those pull requests here. --> ## Checklist - [ ] Code is written and works correctly; - [ ] Changes are covered by tests; - [ ] Documentation reflects the changes; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
