<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:22 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-1341] DBCollection drop method does not delete a collection</title>
                <link>https://jira.mongodb.org/browse/JAVA-1341</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The drop() method in DBCollection does not delete a collection.&lt;/p&gt;</description>
                <environment>Windows 7 &lt;br/&gt;
MongoDB 2.4.9&lt;br/&gt;
MongoDB Java driver 2.11.3</environment>
        <key id="150600">JAVA-1341</key>
            <summary>DBCollection drop method does not delete a collection</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="dvohra">deepak vohra</reporter>
                        <labels>
                    </labels>
                <created>Sat, 2 Aug 2014 21:43:11 +0000</created>
                <updated>Mon, 4 Aug 2014 13:17:56 +0000</updated>
                            <resolved>Sun, 3 Aug 2014 00:15:27 +0000</resolved>
                                    <version>2.4</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="680509" author="dvohra" created="Mon, 4 Aug 2014 13:17:56 +0000"  >&lt;p&gt;But the collection has been dropped. In the following catalog is the document to add to coll.&lt;br/&gt;
coll.insert(catalog);&lt;/p&gt;</comment>
                            <comment id="680177" author="jeff.yemin" created="Mon, 4 Aug 2014 00:10:07 +0000"  >&lt;p&gt;It determines it by its name.&lt;/p&gt;</comment>
                            <comment id="680009" author="dvohra" created="Sun, 3 Aug 2014 15:23:35 +0000"  >&lt;p&gt;Must be some reference to the deleted collection kept in the cache or how else is it determined which collection is being referenced? For example if a collection has been created in another application.&lt;/p&gt;

&lt;p&gt;coll = db.createCollection(&quot;catalog&quot;, null);&lt;/p&gt;

&lt;p&gt;And in a different application the collection is dropped.&lt;br/&gt;
coll = db.getCollection(&quot;catalog&quot;);&lt;br/&gt;
coll.drop();  &lt;/p&gt;

&lt;p&gt;And in the second application the collection is referenced after being dropped.&lt;br/&gt;
coll.insert(catalog);&lt;/p&gt;

&lt;p&gt;How is determined which collection is being referred to? Or, is a reference kept to the dropped collection?&lt;/p&gt;
</comment>
                            <comment id="679987" author="jeff.yemin" created="Sun, 3 Aug 2014 14:07:34 +0000"  >&lt;p&gt;Oh, I see the confusion.  See &lt;a href=&quot;http://docs.mongodb.org/manual/reference/method/db.createCollection/#db.createCollection&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/method/db.createCollection/#db.createCollection&lt;/a&gt;.  It states that collections in MongoDB are created implicitly whenever you reference them.  So in step 4, the collection is created again after you drop it in step 3.&lt;/p&gt;</comment>
                            <comment id="679823" author="dvohra" created="Sun, 3 Aug 2014 04:01:47 +0000"  >&lt;p&gt;Haven&apos;t tested with shell but in a Java application the collection is still available and only the documents get deleted. &lt;/p&gt;

&lt;p&gt;To test:&lt;/p&gt;

&lt;p&gt;1. Create a collection.&lt;br/&gt;
2. Add a document to the collection. &lt;br/&gt;
3. Delete the collection with drop().&lt;br/&gt;
4. Add a document to the collection, which is supposed to have been deleted. The document gets added. &lt;/p&gt;

</comment>
                            <comment id="679744" author="jeff.yemin" created="Sun, 3 Aug 2014 00:15:27 +0000"  >&lt;p&gt;Please re-open if you can demonstrate that the collection is not actually dropped.&lt;/p&gt;</comment>
                            <comment id="679708" author="jeff.yemin" created="Sat, 2 Aug 2014 22:22:59 +0000"  >&lt;p&gt;I just tried it.  Here&apos;s the shell output from before calling drop on collection named foo:&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;&amp;gt; show collections&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;   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;foo&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;system.indexes&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 here it is from after:&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;&amp;gt; show collections&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;&amp;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;What do you see that makes you think it&apos;s not?&lt;/p&gt;</comment>
                            <comment id="679696" author="dvohra" created="Sat, 2 Aug 2014 21:56:35 +0000"  >&lt;p&gt;The drop() method just deletes the documents in the collection but does not delete the collection. Shouldn&apos;t the drop() method delete the collection?&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|hs122f:</customfieldvalue>

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