<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:38:25 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-5093] Opening a collection that has JSON schema validation fires off expensive query in the background</title>
                <link>https://jira.mongodb.org/browse/COMPASS-5093</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;&#160;&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;{ aggregate: \&quot;mycollection\&quot;, pipeline: [ { $match: { $and: [ { $or: [ 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { md5}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;, { md5: &lt;/p&gt;
{ $exists: false }
&lt;p&gt; } ] }, { $or: [ &lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { sha1}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;, { sha1: &lt;/p&gt;
{ $exists: false }
&lt;p&gt; } ] }, { $or: [ &lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { sha256}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;, { sha256: &lt;/p&gt;
{ $exists: false }
&lt;p&gt; } ] } ] } ] } }, { $group: &lt;/p&gt;
{ _id: 1, n: { $sum: 1 } }
&lt;p&gt; } ], c...&quot;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;&#160;&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;This query should be triggered only if the users wants to execute. We should have some UI button to trigger this queries or something similar to the aggregate tab with sample docs. Or at least aggregation should use sample of 1000 docs.&#160;&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="1874930">COMPASS-5093</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="himanshu.singh@mongodb.com">Himanshu Singh</assignee>
                                    <reporter username="juan.soto@mongodb.com">Juan Soto</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Sep 2021 14:06:40 +0000</created>
                <updated>Sun, 29 Oct 2023 02:39:39 +0000</updated>
                            <resolved>Fri, 3 Feb 2023 16:40:45 +0000</resolved>
                                                    <fixVersion>1.36.0</fixVersion>
                                    <component>UI / UX</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5158276" author="xgen-internal-githook" created="Wed, 1 Feb 2023 12:42:09 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Himanshu Singh&apos;, &apos;email&apos;: &apos;himanshu.singhs@outlook.in&apos;, &apos;username&apos;: &apos;himanshusinghs&apos;}
&lt;p&gt;Message: Merge branch &apos;main&apos; into &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5093&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-5093&quot;&gt;&lt;del&gt;COMPASS-5093&lt;/del&gt;&lt;/a&gt;-optimise-schema-validation-tab&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5093&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-5093&quot;&gt;&lt;del&gt;COMPASS-5093&lt;/del&gt;&lt;/a&gt;-optimise-schema-validation-tab&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/3d5366d7c1228b5ccddac9bd11fa7ae7d9f88aa8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/3d5366d7c1228b5ccddac9bd11fa7ae7d9f88aa8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4065432" author="rhys.howell" created="Thu, 16 Sep 2021 12:52:40 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=juan.soto&quot; class=&quot;user-hover&quot; rel=&quot;juan.soto&quot;&gt;juan.soto&lt;/a&gt; - thanks for bringing this up - we&apos;ve fixed this behavior in &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-4998&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/COMPASS-4998&lt;/a&gt; which will land in the next Compass release (1.28.5). Now the validation queries are only executed when the validation tab is opened. Would you like to keep this ticket open as a request to make the validation queries only execute when a button is pressed on the validation tab, or can we close it?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1846788">COMPASS-4998</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 16 Sep 2021 12:52:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 1 week 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="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Schema Validation documentation mentions that the validation updates in real time:&lt;/p&gt;

&lt;p&gt;&amp;gt; As you edit your validation, Compass updates in real-time to display a document from your collection that passes the validation and a document that fails.&lt;/p&gt;

&lt;p&gt;This will not be happening anymore, you would need to press the button to get the preview documents that pass or fail validation&lt;/p&gt;</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>
                            1 year, 1 week ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>himanshu.singh@mongodb.com</customfieldvalue>
            <customfieldvalue>juan.soto@mongodb.com</customfieldvalue>
            <customfieldvalue>rhys.howell@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i01qyn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1ldp:p3bgbi</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="6900">Iteration Turtle</customfieldvalue>
    <customfieldvalue id="6901">Iteration Unicornfish</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|i01d3z:</customfieldvalue>

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