<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:47:26 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-59512] Introduce new find API to DBClientBase which uses IDL-generated FindCommandRequest</title>
                <link>https://jira.mongodb.org/browse/SERVER-59512</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We will add new methods to &lt;tt&gt;DBClientBase&lt;/tt&gt; called &lt;tt&gt;find()&lt;/tt&gt; and &lt;tt&gt;findOne()&lt;/tt&gt;. These perform the same role as the pre-existing &lt;tt&gt;DBClientBase::query()&lt;/tt&gt; methods, but the caller specifies the find operation that they want to perform using the IDL-generated &lt;tt&gt;FindCommandRequest&lt;/tt&gt;. This will make the internal client code easier to maintain, since whenever the find command IDL specification is modified, the client code will immediately benefit without any explicit changes necessary.&lt;/p&gt;

&lt;p&gt;Under the hood, the &lt;tt&gt;DBClientBase::find()&lt;/tt&gt; methods will have slightly different logic for constructing the initial OP_MSG find request to send across the wire. In particular, &lt;tt&gt;DBClientBase::query()&lt;/tt&gt; needs to upconvert the request as specified by the caller to a &lt;tt&gt;FindCommandRequest&lt;/tt&gt; so that the find request can in turn be converted to an OP_MSG. This upconversion step is not necessary for the new &lt;tt&gt;find()&lt;/tt&gt; API.&lt;/p&gt;

&lt;p&gt;This ticket will not complete the work to migrate all the callers off &lt;tt&gt;query()&lt;/tt&gt; and onto &lt;tt&gt;find()&lt;/tt&gt;. That will be achieved as followup work. Once that migration is complete, the &lt;tt&gt;query()&lt;/tt&gt; API and its supporting code can be deleted. In particular the upconversion code mentioned above can be removed!&lt;/p&gt;

&lt;p&gt;Originally we had a slightly different plan in mind for achieving the same goal. The details of the old plan are outlined below for posterity.&lt;/p&gt;

&lt;h5&gt;&lt;a name=&quot;Originalimplementationplan&quot;&gt;&lt;/a&gt;Original implementation plan&lt;/h5&gt;

&lt;p&gt;Implement steps ##5-8, outlined in the description of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58670&quot; title=&quot;Modernize DBClientBase query interface to avoid OP_QUERY-derived characteristics&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58670&quot;&gt;&lt;del&gt;SERVER-58670&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;5. Investigate and remove/replace the remaining four callers of&#160;&lt;tt&gt;fromBSONDeprecated()&lt;/tt&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;(src/mongo/client/dbclient_rs.cpp) in DBClientReplicaSet::say under&#160;&lt;tt&gt;if (lastOp == dbQuery)&lt;/tt&gt;&#160;check &#8211; is this code still reachable?&lt;/li&gt;
	&lt;li&gt;(src/mongo/client/dbclient_rs.cpp) in DBClientReplicaSet::call under&#160;&lt;tt&gt;if (toSend.operation() == dbQuery)&lt;/tt&gt;&#160;check &#8211; is this code still reachable?&lt;/li&gt;
	&lt;li&gt;(src/mongo/db/repl/apply_ops.cpp) in _checkPrecondition &#8211; should/could preconditions use different format?&lt;/li&gt;
	&lt;li&gt;(src/mongo/scripting/mozjs/mongo.cpp) in MongoBase::Functions::find::call &#8211; should we still be supporting &apos;query/$query&apos; here?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;6. When all Query construction from raw BSON is gone, the type will only handle a known fixed set of query properties, so it will become possible to replace the internal BSON field &apos;obj&apos; with statically typed fields, and callers that inspect &apos;obj&apos; will be able to switch to using specific statically typed accessors instead. There are currently 7 callers like this (search for&#160;&lt;tt&gt;getFullSettingsDeprecated()&lt;/tt&gt;).&lt;br/&gt;
 7. Rename the Query type into QueryOptions (or FindOptions) and incorporate into it the other options that are currently passed to the&#160;&lt;tt&gt;query()&lt;/tt&gt;&#160;APIs as separate arguments.&lt;br/&gt;
 8. Review and cleanup src/mongo/db/query/query_request_helper.cpp. There should be no vestiges of OP_QUERY left at this point.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1858379">SERVER-59512</key>
            <summary>Introduce new find API to DBClientBase which uses IDL-generated FindCommandRequest</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="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="13201">Fixed</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="irina.yatsenko@mongodb.com">Irina Yatsenko</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Aug 2021 20:04:04 +0000</created>
                <updated>Sun, 29 Oct 2023 21:49:16 +0000</updated>
                            <resolved>Wed, 10 Nov 2021 17:25:56 +0000</resolved>
                                                    <fixVersion>5.2.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4180948" author="david.storch" created="Wed, 10 Nov 2021 17:35:24 +0000"  >&lt;p&gt;I filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61385&quot; title=&quot;Migrate most callers of legacy &amp;#39;DBClientBase::query()&amp;#39; API to modern &amp;#39;find()&amp;#39; API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61385&quot;&gt;&lt;del&gt;SERVER-61385&lt;/del&gt;&lt;/a&gt; to track the follow-up work. In this ticket, we will port callers over from &lt;tt&gt;DBClientBase::query()&lt;/tt&gt; to &lt;tt&gt;DBClientBase::find()&lt;/tt&gt; and attempt to remove any code associated with &lt;tt&gt;DBClientBase::query()&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="4180874" author="xgen-internal-githook" created="Wed, 10 Nov 2021 17:13:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;email&apos;: &apos;david.storch@mongodb.com&apos;, &apos;username&apos;: &apos;dstorch&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59512&quot; title=&quot;Introduce new find API to DBClientBase which uses IDL-generated FindCommandRequest&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59512&quot;&gt;&lt;del&gt;SERVER-59512&lt;/del&gt;&lt;/a&gt; add new, cleaner query interface to DBClientBase&lt;/p&gt;

&lt;p&gt;The new interface uses FindCommandRequest, and avoids any&lt;br/&gt;
characteristics that relate specifically to the&lt;br/&gt;
no-longer-supported OP_QUERY wire protocol message. This&lt;br/&gt;
patch moves all callers of &apos;findOne()&apos; onto the new API, but&lt;br/&gt;
more work is required to fully eliminate the old &apos;query()&apos; API&lt;br/&gt;
from DBClientBase.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1b51a502f9201aacf760ba37b02888bbbff831da&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1b51a502f9201aacf760ba37b02888bbbff831da&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4180872" author="xgen-internal-githook" created="Wed, 10 Nov 2021 17:13:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;David Storch&apos;, &apos;email&apos;: &apos;david.storch@mongodb.com&apos;, &apos;username&apos;: &apos;dstorch&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59512&quot; title=&quot;Introduce new find API to DBClientBase which uses IDL-generated FindCommandRequest&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59512&quot;&gt;&lt;del&gt;SERVER-59512&lt;/del&gt;&lt;/a&gt; Accommodate DBClientBase::findOne() API change&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/deb67757a28ed4bbb0d78f0af1da4eae9dfcbed5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/deb67757a28ed4bbb0d78f0af1da4eae9dfcbed5&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1922389">SERVER-61385</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1954863">SERVER-62206</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1823904">SERVER-58670</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 8 Nov 2021 22:51:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 13 weeks 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2156</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 13 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>irina.yatsenko@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzyxlr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2nfb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5269">QE 2021-11-01</customfieldvalue>
    <customfieldvalue id="5271">QE 2021-11-15</customfieldvalue>

                        </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|hzyjun:</customfieldvalue>

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