<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:47 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-1623] DeleteOptions Hint is not working on DeleteMany</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1623</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;DeleteOptions Hint in deleteMany is not working.&lt;/p&gt;

&lt;p&gt;Error:&#160;(Location40415) BSON field &apos;delete.deletes.hint&apos; is an unknown field.&lt;/p&gt;

&lt;p&gt;Code:&lt;br/&gt;
		deleteOptions := &amp;amp;options.DeleteOptions{&lt;br/&gt;
			Hint: bson.M&lt;/p&gt;
{&quot;example&quot;: 1}
&lt;p&gt;,&lt;br/&gt;
		}&lt;br/&gt;
	_, err = coll.DeleteMany(ctx, filter, deleteOptions)&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1361754">GODRIVER-1623</key>
            <summary>DeleteOptions Hint is not working on DeleteMany</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13202">Works as Designed</resolution>
                                        <assignee username="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="aravind.4svg@gmail.com">Aravind Kumar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 May 2020 12:40:41 +0000</created>
                <updated>Fri, 27 Oct 2023 13:16:28 +0000</updated>
                            <resolved>Thu, 28 May 2020 02:38:18 +0000</resolved>
                                                                    <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3133201" author="JIRAUSER1252636" created="Thu, 28 May 2020 02:17:30 +0000"  >&lt;p&gt;we can  close this&lt;/p&gt;</comment>
                            <comment id="3120049" author="divjot.arora" created="Wed, 27 May 2020 14:22:09 +0000"  >&lt;p&gt;Seems like the shell accepts any options and silently ignores them if they&apos;re not correct. The only documented options listed on &lt;a href=&quot;https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/&lt;/a&gt;&#160;are &lt;tt&gt;collation&lt;/tt&gt; and &lt;tt&gt;writeConcern&lt;/tt&gt;. I tried running&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.collectionName.deleteMany({}, {foo: {key: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;and it succeeded as well. The ability to pass a hint to the &lt;tt&gt;delete&lt;/tt&gt; command was added in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44367&quot; title=&quot;Allow hinting the delete command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44367&quot;&gt;&lt;del&gt;SERVER-44367&lt;/del&gt;&lt;/a&gt;, which has a fix version of 4.3.4, so this functionality will be available in the 4.4 server release.&lt;/p&gt;

&lt;p&gt;Can we close out this issue as &quot;works as designed&quot;?&lt;/p&gt;</comment>
                            <comment id="3119635" author="JIRAUSER1252636" created="Wed, 27 May 2020 08:20:31 +0000"  >&lt;p&gt;in server version 4.0.7, db.collectionName.deleteMany({}, {hint: {key: 1}}) is working fine, but dont see any documentation officially.&lt;/p&gt;</comment>
                            <comment id="3107321" author="divjot.arora" created="Tue, 26 May 2020 17:00:36 +0000"  >&lt;p&gt;I can&apos;t repro the installation weirdness. Using Go1.14 on Ubuntu 16.04, running &lt;tt&gt;go get go.mongodb.org/mongo-driver/mongo&lt;/tt&gt; fetches v1.3.3 of the driver, not v1.4.0-beta1. This is the expected behavior as v1.4.0-beta1 is a pre-release. It&apos;s weird to me that running the command gets a different version of the package for you.&lt;/p&gt;

&lt;p&gt;Regardless, per our documentation at&#160;&lt;a href=&quot;https://godoc.org/go.mongodb.org/mongo-driver/mongo/options#DeleteOptions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://godoc.org/go.mongodb.org/mongo-driver/mongo/options#DeleteOptions&lt;/a&gt;, the hint option is only available for DeleteOne/DeleteMany on server versions 4.4 and above. Server versions between 3.4 and 4.2, inclusive, will return an error if the option is used, which is what you&apos;re seeing.&lt;/p&gt;</comment>
                            <comment id="3107253" author="JIRAUSER1252636" created="Tue, 26 May 2020 16:31:17 +0000"  >&lt;p&gt;server version: 4.0.7&lt;/p&gt;

&lt;p&gt;I&apos;m directly installing the package using&lt;br/&gt;
go get go.mongodb.org/mongo-driver/mongo&lt;/p&gt;</comment>
                            <comment id="3106862" author="divjot.arora" created="Tue, 26 May 2020 14:28:16 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=aravind.4svg%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;aravind.4svg@gmail.com&quot;&gt;aravind.4svg@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Can you let us know which server version you&apos;re using? I assume you&apos;re using driver version v1.4.0-beta1 as &lt;tt&gt;DeleteOptions.Hint&lt;/tt&gt; was not available in the 1.3.x releases.&lt;/p&gt;

&lt;p&gt;&amp;#8211; Divjot&lt;/p&gt;</comment>
                    </comments>
                    <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxa4kf:</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>