<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:30:44 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-32605] Aggregation on secondary server is not using the same index as the primary</title>
                <link>https://jira.mongodb.org/browse/SERVER-32605</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;On our development server, I upgraded from 3.6.0 to 3.6.1, and one of our aggregation queries started taking about 30s.  I ran the profiler on both the primary and secondary, and noticed that it was using a different index on the secondary. On the primary, the correct index is used, on the secondary, it is not.  I could solve this problem by adding an additional index, but this is not ideal.  The results from the profiling on the primary (fast.js) and secondary (slow.js) are attached.&lt;/p&gt;</description>
                <environment></environment>
        <key id="480709">SERVER-32605</key>
            <summary>Aggregation on secondary server is not using the same index as the primary</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="4">Incomplete</resolution>
                                        <assignee username="mark.agarunov">Mark Agarunov</assignee>
                                    <reporter username="travis@bryx.com">Travis Brown</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Jan 2018 20:45:25 +0000</created>
                <updated>Wed, 21 Mar 2018 04:32:55 +0000</updated>
                            <resolved>Fri, 16 Feb 2018 22:46:13 +0000</resolved>
                                    <version>3.6.1</version>
                                                    <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1808626" author="thomas.schubert" created="Fri, 16 Feb 2018 22:46:13 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=travis%40bryx.com&quot; class=&quot;user-hover&quot; rel=&quot;travis@bryx.com&quot;&gt;travis@bryx.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;We haven&#8217;t heard back from you for some time, so I&#8217;m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Kelsey&lt;/p&gt;</comment>
                            <comment id="1792505" author="mark.agarunov" created="Thu, 1 Feb 2018 22:44:44 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=travis%40bryx.com&quot; class=&quot;user-hover&quot; rel=&quot;travis@bryx.com&quot;&gt;travis@bryx.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, could you please provide the output of &lt;tt&gt;db.getIndexes()&lt;/tt&gt; from all affected nodes? &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1778391" author="mark.agarunov" created="Thu, 18 Jan 2018 22:00:55 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=travis%40bryx.com&quot; class=&quot;user-hover&quot; rel=&quot;travis@bryx.com&quot;&gt;travis@bryx.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for providing this information. Looking over this, it appears that there may be indexes that exist on one node but not the other, possibly due to &lt;a href=&quot;https://docs.mongodb.com/manual/tutorial/build-indexes-on-replica-sets/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;rolling index builds&lt;/a&gt;. To confirm if this is the case, could you please provide the output of &lt;tt&gt;db.getIndexes()&lt;/tt&gt; from all affected nodes? &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1770746" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:57:12 +0000"  >&lt;p&gt;Hi Mark,&lt;/p&gt;

&lt;p&gt; Please see the attached files.  This has the logs with profiling enabled as well as the result from the explain functions.&lt;/p&gt;

&lt;p&gt;Travis&lt;/p&gt;</comment>
                            <comment id="1770716" author="mark.agarunov" created="Wed, 10 Jan 2018 20:36:31 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=travis%40bryx.com&quot; class=&quot;user-hover&quot; rel=&quot;travis@bryx.com&quot;&gt;travis@bryx.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report. To get a better idea of what may be causing this, could you please provide the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/explain-results/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;output of &lt;tt&gt;explain()&lt;/tt&gt;&lt;/a&gt; as well as the log files from &lt;tt&gt;mongod&lt;/tt&gt; from both the primary and secondary nodes? This should give us some insight into this behavior.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="175191" name="explain_primary_without_new_index.txt" size="38900" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:39 +0000"/>
                            <attachment id="175193" name="explain_secondary_with_new_index.txt" size="107803" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:39 +0000"/>
                            <attachment id="175194" name="explain_secondary_without_new_index.txt" size="107803" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:39 +0000"/>
                            <attachment id="175059" name="fast.js" size="5153" author="travis@bryx.com" created="Tue, 9 Jan 2018 20:45:08 +0000"/>
                            <attachment id="175061" name="indexDetails.png" size="32157" author="travis@bryx.com" created="Tue, 9 Jan 2018 20:47:55 +0000"/>
                            <attachment id="175192" name="primary_without_new_index.log" size="9405" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:38 +0000"/>
                            <attachment id="175196" name="secondary_with_new_index.log" size="9438" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:38 +0000"/>
                            <attachment id="175195" name="secondary_without_new_index.log" size="11353" author="travis@bryx.com" created="Wed, 10 Jan 2018 20:56:38 +0000"/>
                            <attachment id="175060" name="slow.js" size="5263" author="travis@bryx.com" created="Tue, 9 Jan 2018 20:45:07 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 10 Jan 2018 20:36:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 51 weeks, 5 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>backlog-server-pm</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 51 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>mark.agarunov</customfieldvalue>
            <customfieldvalue>travis@bryx.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htnn9j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htf5hr:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Upgrade to 3.6.1&lt;br/&gt;
Run this query with the read preference set to primary&lt;br/&gt;
Run this query with the read preference set to secondaryPreferred&lt;/p&gt;</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_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|htn9dz:</customfieldvalue>

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