<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:38:05 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>[COMPASS-4998] Opening a collection that has JSON schema validation fires off expensive query in the background</title>
                <link>https://jira.mongodb.org/browse/COMPASS-4998</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;h3&gt;&lt;a name=&quot;ProblemStatement%2FRationale&quot;&gt;&lt;/a&gt;&lt;b&gt;Problem Statement/Rationale&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;I have some very large collections (billions of documents) that have JSON schema validation in place. &#160;If I open one of these collections in Compass, even if I don&apos;t click on the Validation tab it still fires off a very expensive query in the background to apparently find any documents that don&apos;t validate, e.g.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&#160;&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;{ aggregate: \&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;mycollection\&quot;, pipeline: [ { $match: { $and: [ { $or: [ { md5: { $type: \&quot;string\&quot;, $regex: \&quot;^[a-f0-9]{32}$\&quot; } }, { md5: { $exists: false } } ] }, { $or: [ { sha1: { $type: \&quot;string\&quot;, $regex: \&quot;^[a-f0-9]{40}$\&quot; } }, { sha1: { $exists: false } } ] }, { $or: [ { sha256: { $type: \&quot;string\&quot;, $regex: \&quot;^[a-f0-9]{64}$\&quot; } }, { sha256: { $exists: false } } ] } ] } ] } }, { $group: { _id: 1, n: { $sum: 1 } } } ], c...&quot;&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;&#160;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;StepstoReproduce&quot;&gt;&lt;/a&gt;&lt;b&gt;Steps to Reproduce&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Create a collection with some data. &#160;Add JSON schema validation. &#160;Open the collection to the Documents tab in Compass and watch the query get fired off using db.currentOp().&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ExpectedResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Expected Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Really this should never happen as with any collections of significant size this is going to cause an issue. &#160;I&apos;m not sure what it&apos;s trying to populate in the UI, but it&apos;s probably better to allow the user to initiate an action to pull this result. &#160;At the very least, it shouldn&apos;t happen until I open the Validation tab, so that I can avoid it by just not going into that part of the UI.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ActualResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Actual Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;Even just opening the Documents tab of the collection in Compass causes this very expensive scan of the entire dataset.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AdditionalNotes&quot;&gt;&lt;/a&gt;&lt;b&gt;Additional Notes&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Any additional information that may be useful to include.&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1846788">COMPASS-4998</key>
            <summary>Opening a collection that has JSON schema validation fires off expensive query in the background</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="leroux.bodenstein@mongodb.com">Le Roux Bodenstein</assignee>
                                    <reporter username="mikew@3gblabs.com">Michael Wilson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 10 Aug 2021 03:27:26 +0000</created>
                <updated>Sun, 29 Oct 2023 02:39:42 +0000</updated>
                            <resolved>Wed, 1 Sep 2021 16:38:34 +0000</resolved>
                                    <version>1.28.1</version>
                                    <fixVersion>1.29.4</fixVersion>
                                    <component>Compass</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4037367" author="xgen-internal-githook" created="Thu, 2 Sep 2021 17:58:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Le Roux Bodenstein&apos;, &apos;email&apos;: &apos;lerouxb@gmail.com&apos;, &apos;username&apos;: &apos;lerouxb&apos;}
&lt;p&gt;Message: fix: lazy-load validations when the user browses to the validation tab (&lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-4998&quot; title=&quot;Opening a collection that has JSON schema validation fires off expensive query in the background&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-4998&quot;&gt;&lt;del&gt;COMPASS-4998&lt;/del&gt;&lt;/a&gt;) (#2433)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix: lazy-load validations when the user browses to the validation tab&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;fix is-loaded and add tests&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tweak dispatch order&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;clean up the tests some more&lt;br/&gt;
Branch: electron-13-same-keytar-node-14&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/14168f56d1f8f2f2221190bf2072388925f439f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/14168f56d1f8f2f2221190bf2072388925f439f3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="4034374" author="xgen-internal-githook" created="Wed, 1 Sep 2021 16:37:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Le Roux Bodenstein&apos;, &apos;email&apos;: &apos;lerouxb@gmail.com&apos;, &apos;username&apos;: &apos;lerouxb&apos;}
&lt;p&gt;Message: fix: lazy-load validations when the user browses to the validation tab (&lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-4998&quot; title=&quot;Opening a collection that has JSON schema validation fires off expensive query in the background&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-4998&quot;&gt;&lt;del&gt;COMPASS-4998&lt;/del&gt;&lt;/a&gt;) (#2433)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;fix: lazy-load validations when the user browses to the validation tab&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;fix is-loaded and add tests&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tweak dispatch order&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;clean up the tests some more&lt;br/&gt;
Branch: main&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/14168f56d1f8f2f2221190bf2072388925f439f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/14168f56d1f8f2f2221190bf2072388925f439f3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1874930">COMPASS-5093</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 11 Aug 2021 14:23:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 22 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_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_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>
                            2 years, 22 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>leroux.bodenstein@mongodb.com</customfieldvalue>
            <customfieldvalue>mikew@3gblabs.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwzxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzfh4f:</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>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5398">Iteration Johannesburg</customfieldvalue>
    <customfieldvalue id="5437">Iteration Kampala</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwm67:</customfieldvalue>

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