<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:27:23 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-74421] Propagate maxTimeMS to mongot for $search queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-74421</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Mongot will be able to reduce the amount of work it does if it is aware of maxTimeMS users specify in $search queries.&#160;&lt;/p&gt;

&lt;p&gt;For instance, mongot can discard a query before or during execution if the timeout has passed.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2276474">SERVER-74421</key>
            <summary>Propagate maxTimeMS to mongot for $search queries</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-integration">Backlog - Query Integration</assignee>
                                    <reporter username="oren.ovadia@mongodb.com">Oren Ovadia</reporter>
                        <labels>
                            <label>qi-search</label>
                    </labels>
                <created>Mon, 27 Feb 2023 22:09:50 +0000</created>
                <updated>Tue, 26 Dec 2023 19:53:01 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="5401988" author="nicholas.zolnierz" created="Thu, 4 May 2023 19:44:24 +0000"  >&lt;p&gt;Sending back to QI triage as we are not planning to do this in PM-2802&lt;/p&gt;</comment>
                            <comment id="5244808" author="nicholas.zolnierz" created="Thu, 2 Mar 2023 19:32:45 +0000"  >&lt;p&gt;Small note: If we end up implementing &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-63765&quot; title=&quot;Pass batchSize zero to mongot during cursor establishment in a sharded cluster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-63765&quot;&gt;SERVER-63765&lt;/a&gt; (which gets us more in line with the way sharded aggregations work between mongos and shards), then there shouldn&apos;t be an issue with the first batch because ideally mongot doesn&apos;t do any work until a cursor is established.&lt;/p&gt;</comment>
                            <comment id="5237917" author="oren.ovadia" created="Tue, 28 Feb 2023 20:10:37 +0000"  >&lt;p&gt;Kevin, good point about killCursors not working for the initial batch. That&apos;s a problem given we are going towards the direction of serving as many search queries as possible in the first batch.&lt;/p&gt;</comment>
                            <comment id="5234951" author="JIRAUSER1270998" created="Tue, 28 Feb 2023 00:20:44 +0000"  >&lt;p&gt;According to the &lt;a href=&quot;https://docs.google.com/document/d/1lLjJ51klXN6VI9iPg-r2sVuKFyn0uvHgxhBjw9XkoFc/edit&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB gRPC protocol&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot;&gt;
&lt;p&gt;Clients SHOULD enforce timeouts client side by closing the stream after a deadline has been reached.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Mongot can kill the running cursor after stream is cancelled by client.&lt;/p&gt;

&lt;p&gt;For mongorpc, mongod may terminate the TCP connection instead.&lt;/p&gt;</comment>
                            <comment id="5234878" author="kevin.rosendahl" created="Mon, 27 Feb 2023 23:54:13 +0000"  >&lt;p&gt;Definitely agree we should improve the handling of killCursors.&lt;/p&gt;

&lt;p&gt;However, I&apos;m not sure that will be sufficient, since you need a cursorId in order to issue a killCursor, so effectively you can only prevent getMores from doing more work and can&apos;t cancel an outstanding initial search command. There may be other ways to handle this in theory at the network layer, but simply letting mongot cancel work it knows is useless would definitely be the most elegant, and as Oren mentioned, it&apos;s very useful signal for other purposes as well. cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=xiaobo.zhou%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;xiaobo.zhou@mongodb.com&quot;&gt;xiaobo.zhou@mongodb.com&lt;/a&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5234851" author="oren.ovadia" created="Mon, 27 Feb 2023 23:38:56 +0000"  >&lt;p&gt;From our discussion:&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nicholas.zolnierz%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;nicholas.zolnierz@mongodb.com&quot;&gt;nicholas.zolnierz@mongodb.com&lt;/a&gt; said:&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;mongod respects the maxTimeMS on the overall aggregation, and will kill the mongot cursor appropriately. Does that not work or did you have something else in mind?&lt;br/&gt;
.....&lt;br/&gt;
There are some situations where mongos or a driver can issue a killCursors&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Good point Nick.&lt;/p&gt;

&lt;p&gt;Today mongot does not know how to terminate an executing query or query in queue. We should fix that. I&apos;ll open a ticket for that on mongot. We should also evaluate how this behaves.&lt;/p&gt;

&lt;p&gt;There is a difference from mongot&apos;s perspective between being aware of maxTimeMS when the query (or getMore) is received compared to having killCursor being called, because it gives mongot this information up front, it can be wiser about whether it puts the timeout guardrails on queries or not, and how often it should be checking those. This may also apply to returning partial results if we ever want to support that. That said, we will still want to have better support for killCursor, in cases where killCursor is explicitly called, or for cases like hedged reads, where we want to reduce redundant work, but we may not want to enforce timeouts up front.&lt;/p&gt;



&lt;p&gt;In the decoupled architecture, where a search query may involve more than one RPC, this timeout will be forwarded down the RPC call stack and self enforced by each process, which makes enforcing deadlines simple (FYI: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.rosendahl%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;kevin.rosendahl@mongodb.com&quot;&gt;kevin.rosendahl@mongodb.com&lt;/a&gt; , not sure I captured your intent on this point, feel free to correct me on this one).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1985449">SERVER-63765</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25467"><![CDATA[Query Integration]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 27 Feb 2023 23:54:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        39 weeks, 6 days 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>ted.tuckman@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            39 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-integration</customfieldvalue>
            <customfieldvalue>kevin.rosendahl@mongodb.com</customfieldvalue>
            <customfieldvalue>nicholas.zolnierz@mongodb.com</customfieldvalue>
            <customfieldvalue>oren.ovadia@mongodb.com</customfieldvalue>
            <customfieldvalue>xiaobo.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1y273:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1ggw0:</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_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|i1xocf:</customfieldvalue>

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