<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:45 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>[GODRIVER-1605] Allow cursor options to be specified when using RunCommandCursor</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1605</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The &lt;tt&gt;Database.RunCommandCursor&lt;/tt&gt; method doesn&apos;t allow users to specify cursor options that are part of &lt;tt&gt;getMore&lt;/tt&gt; rather than the initial find/aggregate/etc. We should figure out how we can add this functionality without changing the API. One thought is to add them to &lt;tt&gt;options.RunCmdOptions&lt;/tt&gt; and document that they only apply to &lt;tt&gt;RunCommandCursor&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1340603">GODRIVER-1605</key>
            <summary>Allow cursor options to be specified when using RunCommandCursor</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="13201">Fixed</resolution>
                                        <assignee username="preston.vasquez@mongodb.com">Preston Vasquez</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 May 2020 16:32:30 +0000</created>
                <updated>Sat, 28 Oct 2023 11:38:11 +0000</updated>
                            <resolved>Thu, 23 Mar 2023 21:30:13 +0000</resolved>
                                                    <fixVersion>1.12.0</fixVersion>
                    <fixVersion>1.11.7</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5476106" author="xgen-internal-githook" created="Mon, 5 Jun 2023 20:05:18 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Preston Vasquez&apos;, &apos;email&apos;: &apos;prestonvasquez@icloud.com&apos;, &apos;username&apos;: &apos;prestonvasquez&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1605&quot; title=&quot;Allow cursor options to be specified when using RunCommandCursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1605&quot;&gt;&lt;del&gt;GODRIVER-1605&lt;/del&gt;&lt;/a&gt; Add SetBatchSize to mongo.Cursor (#1201)&lt;/p&gt;

&lt;p&gt;Co-authored-by: Matt Dale &amp;lt;9760375+matthewdale@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: release/1.11&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/67f33810ad9ce35bf9dca29691503baf3ce6a4ef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/67f33810ad9ce35bf9dca29691503baf3ce6a4ef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5297226" author="xgen-internal-githook" created="Thu, 23 Mar 2023 21:28:50 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Preston Vasquez&apos;, &apos;email&apos;: &apos;prestonvasquez@icloud.com&apos;, &apos;username&apos;: &apos;prestonvasquez&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1605&quot; title=&quot;Allow cursor options to be specified when using RunCommandCursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1605&quot;&gt;&lt;del&gt;GODRIVER-1605&lt;/del&gt;&lt;/a&gt; Add SetBatchSize to mongo.Cursor (#1201)&lt;/p&gt;

&lt;p&gt;Co-authored-by: Matt Dale &amp;lt;9760375+matthewdale@users.noreply.github.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/8d7f05ff302ffbdd0d82836d51bbd6d53dfe908d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/8d7f05ff302ffbdd0d82836d51bbd6d53dfe908d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5195039" author="huan.li" created="Mon, 13 Feb 2023 22:46:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.bhargava%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;esha.bhargava@mongodb.com&quot;&gt;esha.bhargava@mongodb.com&lt;/a&gt; We are not literally &quot;blocked&quot; by this feature. But a few of our recent replication failures were caused by the cursor timeout. With this new feature, we could largely avoid such failures.&lt;/p&gt;</comment>
                            <comment id="5194075" author="JIRAUSER1259527" created="Mon, 13 Feb 2023 18:20:10 +0000"  >&lt;p&gt;Some additional implement options:&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;Getbatchsizefrom%7B%7BRunCommandCursor%7D%7Dcommand&quot;&gt;&lt;/a&gt;Get batch size from &lt;tt&gt;RunCommandCursor&lt;/tt&gt; command&lt;/h2&gt;
&lt;p&gt;Another way to implement this is to fetch the &quot;batchSize&quot; from the command document and use that as the &quot;batchSize&quot; option when we create the cursor. There are pros and cons to that approach:&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;No API syntax changes required.&lt;/li&gt;
	&lt;li&gt;Batch size only needs to be specified in a single place.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Different commands specify batch size in different places in the command document, so we&apos;d have to write logic to fetch &quot;batchSize&quot; for each command that creates a cursor.&lt;/li&gt;
	&lt;li&gt;May be less obvious to users who expect to set batch size on an options struct. It&apos;s on us to document it well.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name=&quot;Add%7B%7BCursor.SetBatchSize%7D%7D&quot;&gt;&lt;/a&gt;Add &lt;tt&gt;Cursor.SetBatchSize&lt;/tt&gt;&lt;/h2&gt;
&lt;p&gt;A 3rd option is to add a function &lt;tt&gt;SetBatchSize&lt;/tt&gt; to &lt;tt&gt;Cursor&lt;/tt&gt; that allows setting batch size on a &lt;tt&gt;Cursor&lt;/tt&gt; after creating it. Inspired by the Python driver API &lt;tt&gt;cursor.batch_size&lt;/tt&gt;. Pros/cons:&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Adding &lt;tt&gt;SetBatchSize&lt;/tt&gt; to &lt;tt&gt;Cursor&lt;/tt&gt; is extremely simple to implement and has no impact on&lt;/li&gt;
	&lt;li&gt;Providing a way to set batch size on a &lt;tt&gt;Cursor&lt;/tt&gt; technically provides a way for users to fetch an empty batch, then change the batch size for subsequent &quot;getMore&quot; commands. See &lt;a href=&quot;https://jira.mongodb.org/browse/PYTHON-2563&quot; title=&quot;Deprecate CommandCursor.batch_size&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PYTHON-2563&quot;&gt;&lt;del&gt;PYTHON-2563&lt;/del&gt;&lt;/a&gt; for inspiration.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;For the vast majority of users, &lt;tt&gt;SetBatchSize&lt;/tt&gt; would be redundant because they only want to set the batch size once on the original command. It could add confusion for users who don&apos;t understand why it&apos;s there.&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;

&lt;p&gt;Compare to pros/cons of adding a &lt;tt&gt;BatchSize&lt;/tt&gt; option to &lt;tt&gt;options.RunCmdOptions&lt;/tt&gt; as suggested in the ticket description:&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Specifying a cursor batch size is obvious.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Cons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Applying the &lt;tt&gt;BatchSize&lt;/tt&gt; option to the original command could be difficult because different command documents specify batch size in different places. If we only apply the batch size to the cursor (not the original command), then users have to specify batch size twice (if they care about the size of the initial batch).&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;RunCmdOptions&lt;/tt&gt; would have values that don&apos;t apply to &lt;tt&gt;RunCommand&lt;/tt&gt;, which could be confusing. That&apos;s something we&apos;d want to fix in Go Driver 2.0 by separating options for &lt;tt&gt;RunCommand&lt;/tt&gt; and &lt;tt&gt;RunCommandCursor&lt;/tt&gt;.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5184083" author="huan.li" created="Thu, 9 Feb 2023 19:05:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.eric.albertson%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;kevin.eric.albertson@gmail.com&quot;&gt;kevin.eric.albertson@gmail.com&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.dale%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matt.dale@mongodb.com&quot;&gt;matt.dale@mongodb.com&lt;/a&gt; Can we reprioritize this ticket based on the discussion &lt;a href=&quot;https://mongodb.slack.com/archives/C7WJZNUTA/p1675879216249919&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1636324">DRIVERS-1589</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1633687">GODRIVER-1900</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx6zl3:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>