<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:38: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>[SERVER-15561] I want to apply notablescan to per DB or per COLLECTION on production.</title>
                <link>https://jira.mongodb.org/browse/SERVER-15561</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;WISH&quot;&gt;&lt;/a&gt;WISH&lt;/h3&gt;
&lt;p&gt;  Want to use notablescan on the production DB.&lt;br/&gt;
  Want to apply notablescan to per DB or per COLLECTION.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;REASON&quot;&gt;&lt;/a&gt;REASON&lt;/h3&gt;
&lt;p&gt;  We can kill our mongod easily by sending query with no indexed field to the &lt;b&gt;more than hundreds GB of collection&lt;/b&gt;.&lt;br/&gt;
  To make matters worse, we&apos;ll get same results by specifying &lt;b&gt;non-existent field&lt;/b&gt; cause by simple &lt;b&gt;typo&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;  The feature of notablescan option can prevent these catastrophic incidents.&lt;br/&gt;
  Especially, on the production DB.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;ADDITIONAL&quot;&gt;&lt;/a&gt;ADDITIONAL&lt;/h3&gt;
&lt;p&gt;  But currently, likely to add this sentence to mongo-docs.&lt;/p&gt;

 &lt;blockquote&gt;
&lt;p&gt;  +   Don&apos;t run production :program:`mongod` instances with&lt;br/&gt;
  +   :parameter:`notablescan` because preventing table scans can potentially&lt;br/&gt;
  +   affect queries in all databases, including administrative queries.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt; &lt;a href=&quot;https://github.com/mongodb/docs/commit/43a37686f53102e639a33d404e9f73f47d1729a6#diff-ee73e0a6a2ede9af5743e69b8fad4f80R128&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/43a37686f53102e639a33d404e9f73f47d1729a6#diff-ee73e0a6a2ede9af5743e69b8fad4f80R128&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  I think, this is the wrong policy to keep our mongo system safety.&lt;br/&gt;
  On the contrary, I want to come to be that the notablescan option is applicable per DB or per COLLECTION.&lt;/p&gt;</description>
                <environment></environment>
        <key id="162522">SERVER-15561</key>
            <summary>I want to apply notablescan to per DB or per COLLECTION on production.</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="crumbjp">Hiroaki</reporter>
                        <labels>
                            <label>asya</label>
                    </labels>
                <created>Wed, 8 Oct 2014 07:06:38 +0000</created>
                <updated>Fri, 7 Apr 2023 15:45:45 +0000</updated>
                                                                            <component>Querying</component>
                                        <votes>10</votes>
                                    <watches>19</watches>
                                                                                                                <comments>
                            <comment id="1951704" author="asya" created="Thu, 19 Jul 2018 20:04:38 +0000"  >&lt;p&gt;Most related tickets talk about &quot;typos&quot; - generally that only happens in the shell during interactive sessions.&#160; I opened&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36196&quot; title=&quot;expose function in shell to determine if it&amp;#39;s running in interactive mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36196&quot;&gt;&lt;del&gt;SERVER-36196&lt;/del&gt;&lt;/a&gt; to make it possible to determine in the shell whether it&apos;s being run in interactive mode - that would allow us to alter the shell helpers to either disallow or warn on attempts to query a large collection without an index.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="937878" author="glen.miner" created="Thu, 11 Jun 2015 16:56:32 +0000"  >&lt;p&gt;As I mentioned in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1143&quot; title=&quot;Allow --notablescan to be specified per connection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1143&quot;&gt;SERVER-1143&lt;/a&gt; I think what would be best would be &quot;notablescan by default&quot; but you can opt out like rs.slaveOk() when you need to do something dangerous. This would prevent a large number of fat-finger fires.&lt;/p&gt;</comment>
                            <comment id="740986" author="ramon.fernandez" created="Tue, 14 Oct 2014 18:51:50 +0000"  >&lt;p&gt;Understood, thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=crumbjp&quot; class=&quot;user-hover&quot; rel=&quot;crumbjp&quot;&gt;crumbjp&lt;/a&gt;. We&apos;re keeping this ticket open to consider your request for a future version of MongoDB.&lt;/p&gt;</comment>
                            <comment id="738286" author="crumbjp" created="Fri, 10 Oct 2014 01:02:28 +0000"  >&lt;p&gt;I don&apos;t want to investigate the reason of the mongod killed.&lt;/p&gt;

&lt;p&gt;This issue is obviously not caused from any bugs.&lt;br/&gt;
Simply, caused from (unintentionally) heavy load.&lt;/p&gt;

&lt;p&gt;Not only MnogoDB, this is the theory of the all of the system that under the high-load.&lt;br/&gt;
The operation of  these kind of the system is very tense. &lt;br/&gt;
So I want to reduce the risk of simple typo.&lt;/p&gt;
</comment>
                            <comment id="738080" author="ramon.fernandez" created="Thu, 9 Oct 2014 20:41:29 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=crumbjp&quot; class=&quot;user-hover&quot; rel=&quot;crumbjp&quot;&gt;crumbjp&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;without full logs my only guess is that &lt;tt&gt;mongod&lt;/tt&gt; could be being killed by the OOM killer from the OS, but we&apos;d like to make sure there are no other bugs lurking that may be causing this issue. If you could upload full logs from the &lt;tt&gt;mongod&lt;/tt&gt; process from startup until one of your queries kills it that would help us investigate the issue. If it&apos;s easy for you to reproduce the scenario you describe, please &lt;a href=&quot;http://docs.mongodb.org/manual/reference/parameters/#param.logLevel&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;increase the logLevel to 1&lt;/a&gt; and upload the resulting logs from startup of the &lt;tt&gt;mongod&lt;/tt&gt; process.&lt;/p&gt;

&lt;p&gt;Additionally, we&apos;d like to consider your suggestion so we&apos;re either going to keep this ticket open, or merge it with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1143&quot; title=&quot;Allow --notablescan to be specified per connection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1143&quot;&gt;SERVER-1143&lt;/a&gt; which suggest a similar enhancement.&lt;/p&gt;

&lt;p&gt;Please let us know if you can upload the requested logs.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="736685" author="crumbjp" created="Wed, 8 Oct 2014 16:57:02 +0000"  >&lt;p&gt;OS: Linux (Cent, Ubuntu)&lt;br/&gt;
storage: SSD &lt;br/&gt;
memory: more than 60 GB&lt;br/&gt;
Data size: more than 500GB ~ ?TB&lt;/p&gt;

&lt;p&gt;If I issue a fullscan query, the OP occupy large resource, and tu&#65362;n hot-data out and cause heavy thrashing.&lt;br/&gt;
So, entire the query will slowdown and mongod will be silent and finally died.&lt;br/&gt;
Continuous these events will conclude in some minutes.&lt;/p&gt;

&lt;p&gt;I know that this is the harsh environment case.&lt;br/&gt;
Therefor to begin with, MongoDB is the product that intended for the above. I believe.&lt;/p&gt;

&lt;p&gt;The maxTimeMS is good feature.&lt;br/&gt;
I already use it when I FEEL THE QUERY IS DANGER.&lt;br/&gt;
But I don&apos;t feel use it to all my query. (And difficult to prospect the time of query before issue ) &lt;/p&gt;</comment>
                            <comment id="736604" author="ramon.fernandez" created="Wed, 8 Oct 2014 15:49:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=crumbjp&quot; class=&quot;user-hover&quot; rel=&quot;crumbjp&quot;&gt;crumbjp&lt;/a&gt;, a tablescan should not kill &lt;tt&gt;mongod&lt;/tt&gt;. If this happens to you it would be great if you could provide additional information to investigate if there&apos;s a bug somewhere. In particular:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;What platform are you using? OS name and version, virtualization platform if any, memory size...&lt;/li&gt;
	&lt;li&gt;What kind of MongoDB deployment do you have? Are you using sharding? Replication?&lt;/li&gt;
	&lt;li&gt;Are you able to upload logs from the &lt;tt&gt;mongod&lt;/tt&gt; node that becomes unavailable during a tablescan?&lt;/li&gt;
	&lt;li&gt;What does your schema look like? What type of queries make &lt;tt&gt;mongod&lt;/tt&gt; unavailable?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In the meantime you may want to investigate the use of &lt;a href=&quot;http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS/#maxtimems&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;maxTimeMS&lt;/a&gt; and/or &lt;a href=&quot;http://docs.mongodb.org/manual/reference/operator/meta/maxScan/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;maxScan&lt;/a&gt; in your queries, that may help you work around this issue.&lt;/p&gt;

&lt;p&gt;Looking forward to hear more details so we can get to the bottom of this.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ram&#243;n.&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>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="12008">SERVER-1143</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="516593">SERVER-34127</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000arDBtIAM]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Oct 2014 13:38:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 29 weeks, 6 days 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_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>
                            5 years, 29 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>glen.miner</customfieldvalue>
            <customfieldvalue>crumbjp</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlm8n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2dpb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>141618</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_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|hsgl8f:</customfieldvalue>

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