<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:05:39 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-24198] When planning fails because there is no way to answer the query, it should emit ErrorCodes::NoQueryExecutionPlans</title>
                <link>https://jira.mongodb.org/browse/SERVER-24198</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The planner now uses ErrorCodes::BadValue when it fails due to the absence of any available query solutions. This is too generic. Instead we should introduce ErrorCodes::NoQuerySolutions in order to allow clients to check for this particular error case.&lt;/p&gt;

&lt;h5&gt;&lt;a name=&quot;Originaldescription&quot;&gt;&lt;/a&gt;Original description&lt;/h5&gt;

&lt;p&gt;I&apos;m doing some work trying to get MongoDB 3.2 to work with parse-server. parse-server has a feature where if you do a geo query and don&apos;t have the appropriate index, it catches the error, creates the index, then retries the query. Previously this worked by catching the error code 17007 but in MongoDB 3.2 it appears that this error code is now 2.&lt;/p&gt;

&lt;p&gt;I wanted to check if this was expected behavior before coding around the issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="287558">SERVER-24198</key>
            <summary>When planning fails because there is no way to answer the query, it should emit ErrorCodes::NoQueryExecutionPlans</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="tyler.brock@gmail.com">Tyler Brock</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 May 2016 16:18:28 +0000</created>
                <updated>Tue, 6 Dec 2022 04:25:27 +0000</updated>
                            <resolved>Tue, 8 Oct 2019 16:24:13 +0000</resolved>
                                    <version>3.2.6</version>
                                                    <component>Querying</component>
                                        <votes>1</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="2471843" author="david.storch" created="Tue, 8 Oct 2019 16:22:55 +0000"  >&lt;p&gt;This improvement was completed as part of related ticket &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43202&quot; title=&quot;Aggregation system can continue trying to execute a query plan after being interrupted, leading to server-fatal invariant failure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43202&quot;&gt;&lt;del&gt;SERVER-43202&lt;/del&gt;&lt;/a&gt;, so I&apos;m closing this ticket as &quot;gone away&quot;. The improvement will be available as of version 4.2.1. When a query fails because no plan is available, then the operation should fail with code 291, &quot;NoQueryExecutionPlans&quot;. This can happen if &lt;a href=&quot;https://docs.mongodb.com/manual/reference/parameters/#param.notablescan&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;--notablescan&lt;/a&gt; is enabled, or if a required index (e.g. a geospatial or text index) is missing.&lt;/p&gt;</comment>
                            <comment id="2405817" author="matthew.monteleone" created="Tue, 3 Sep 2019 18:15:01 +0000"  >&lt;p&gt;As an additional perspective on this....&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Since this option is exposed in the Atlas interface, more customers with less experience with MongoDb may be faced with the current error message. The current error message can be a bit cryptic to these users.&lt;/p&gt;


&lt;p&gt;The more specific {{NoQuerySolutionMissingRequiredIndex }}could be very useful in reducing customer frustration and reducing support load.&lt;/p&gt;</comment>
                            <comment id="1267851" author="david.storch" created="Wed, 18 May 2016 17:30:05 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Ah, thanks dstorch. Can we add something like ErrorCodes::NoQuerySolutionMissingRequiredIndex to make it more explicit or is that too verbose and specific?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think NoQuerySolutions is better. The only way this can happen is 1) you issue a geoNear query without the right geo index, 2) you issue a text query without a text index, or 3) the plan would be a collection scan but you have disabled collection scans via &lt;tt&gt;--notablescan&lt;/tt&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In your mind what would the best way to catch this particular error for a missing 2d index for a geo query on MongoDB spanning multiple versions? Would a regex match for &quot;unable to find index for $geoNear query&quot; on error message do the trick or is there a better way?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Definitely not ErrorCodes::BadValue &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. You could rely on the text of the error message, though that may not be a great workaround. Otherwise I can&apos;t think of a trick besides using listIndexes to ensure that the appropriate indices exist on the collection.&lt;/p&gt;</comment>
                            <comment id="1267844" author="tyler.brock@gmail.com" created="Wed, 18 May 2016 17:21:59 +0000"  >&lt;p&gt;Ah, thanks dstorch. Can we add something like ErrorCodes::NoQuerySolutionMissingRequiredIndex to make it more explicit or is that too verbose and specific?&lt;/p&gt;

&lt;p&gt;In your mind what would the best way to catch this particular error for a missing 2d index for a geo query on MongoDB spanning multiple versions? Would a regex match for &quot;unable to find index for $geoNear query&quot; on error message do the trick or is there a better way?&lt;/p&gt;</comment>
                            <comment id="1267835" author="david.storch" created="Wed, 18 May 2016 17:14:42 +0000"  >&lt;p&gt;I would say this is expected behavior. The query planner has always issued ErrorCodes::BadValue when it detects that a $near query cannot be answered in the absence of a matching geospatial index. Previous versions of the server converted this error status into a user assertion exception with code 17007 in order to propagate the error to the client. In 3.2, we made a change that caused us to propagate the original error status rather than changing it to 17007. (By the way, 17007 was never reserved for this particular geo-related error case; I think there are many kinds of query planning or query execution errors that could result in 17007.)&lt;/p&gt;

&lt;p&gt;That said, I think we could be using a better / more specific error code here instead of ErrorCodes::BadValue. I&apos;m going to repurpose this ticket as a request to add ErrorCodes::NoQuerySolution.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="918764">SERVER-43202</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000fMdR3QAK, 5002K00000gkBBjQAM, 500A000000UaYRsIAN, 500A000000UaUoGIAV, 500A000000UaUnXIAV]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 18 May 2016 17:14:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 18 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 18 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.monteleone@mongodb.com</customfieldvalue>
            <customfieldvalue>tyler.brock@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk7qv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6rvj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsexyf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>