<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:48 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>[JAVA-667] Caching Behavior Inconsistent when Dropping Indexes</title>
                <link>https://jira.mongodb.org/browse/JAVA-667</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Based on testing, it seems that the caching behavior of the Java driver in terms of the dropped indexes is different based on how the drop of indexes is called.&lt;/p&gt;

&lt;p&gt;Does NOT remove cached indexes:&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;   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;DBObject command = Documents.build(&quot;dropIndexes&quot;, collectionName).append(&quot;index&quot;, &quot;*&quot;).get();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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.command(command);&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;DOES remove cached indexes:&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;collection.dropIndexes()&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;This behavior can cause subsequent re-addition of indexes to fail (as a no-op essentially, there is no indication of the fact that the index has not been created) and can cause significant issues when indexes fail to be added.&lt;/p&gt;</description>
                <environment></environment>
        <key id="53182">JAVA-667</key>
            <summary>Caching Behavior Inconsistent when Dropping Indexes</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="adamc">Adam Comerford</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Oct 2012 15:11:27 +0000</created>
                <updated>Mon, 6 Apr 2015 21:54:20 +0000</updated>
                            <resolved>Mon, 6 Apr 2015 21:54:20 +0000</resolved>
                                    <version>2.9.1</version>
                                                    <component>Command Operations</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="874032" author="jeff.yemin" created="Mon, 6 Apr 2015 21:54:20 +0000"  >&lt;p&gt;DBCollection.ensureIndex has been removed in 3.0, along with any associated caching behavior.  So closing this as won&apos;t fix.&lt;/p&gt;</comment>
                            <comment id="277248" author="jeff.yemin" created="Wed, 27 Feb 2013 16:41:08 +0000"  >&lt;p&gt;If this is a concern, clients can always use DBCollection.createIndex to bypass the caching layer.&lt;/p&gt;</comment>
                            <comment id="241756" author="michael.benoit@mtvn.com" created="Wed, 16 Jan 2013 19:51:00 +0000"  >&lt;p&gt;We don&apos;t want to make a round-trip to the server to check for index existence, and the built-in caching in the driver takes care of it. The way our application is designed, it might be necessary to call &lt;tt&gt;ensureIndex&lt;/tt&gt; hundreds (or thousands) of times per second. At this rate, that short round-trip will get awfully expensive. You could certainly argue that this is a design flaw in our application &amp;#8211; and it&apos;s something we should probably revisit &amp;#8211; but for now I just need &quot;ensure&quot; that we avoid the extra round-trip.&lt;/p&gt;</comment>
                            <comment id="240910" author="jeff.yemin" created="Tue, 15 Jan 2013 23:18:39 +0000"  >&lt;p&gt;Hi Mike,&lt;/p&gt;

&lt;p&gt;  In what way are you relying on it? The server already treats an ensureIndex of an existing index as a no-op, so removing the caching from the driver simply means that we incur a short round-trip to the server to check for existence.&lt;/p&gt;</comment>
                            <comment id="240472" author="michael.benoit@mtvn.com" created="Tue, 15 Jan 2013 15:41:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt;, in &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-704?focusedCommentId=203254&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-203254&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; on &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-667&quot; title=&quot;Caching Behavior Inconsistent when Dropping Indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-667&quot;&gt;&lt;del&gt;JAVA-667&lt;/del&gt;&lt;/a&gt;, you suggested that caching of indices should be removed from the driver. We currently rely on the caching behavior of &lt;tt&gt;ensureIndex&lt;/tt&gt;. We could change that easily enough and move the caching to the application layer. Any idea how soon you intend to remove the cache?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="57912">JAVA-704</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgaiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8613</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>