<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:13:02 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-69264] Fail time-series index builds due to mixed schema only at commit time</title>
                <link>https://jira.mongodb.org/browse/SERVER-69264</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We return an error on the primary if we detect mixed schema data in a document. &lt;a href=&quot;https://github.com/mongodb/mongo/commit/8b405630fc1506abf620aaf4b08363d015327c9b#diff-1d0791a482e60a777ef63320940fe458376cbd1424ec8f3396a2023d24417020R705-R706&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;See code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;The issue with this check is that we cannot guarantee that a node will ever be primary when scanning any problematic documents. Consider the following scenario:&lt;/del&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;del&gt;Node 1 is primary, Node 2 is secondary&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;Node 1 replicates a startIndexBuild oplog entry, and both Node 1 and 2 start a collection scan&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;Node 2 scans a mixed-schema document, but does not report an error because it is secondary&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;A leadership change happens and Node 2 becomes primary, Node 1 becomes secondary&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;Now Node 1 scans a mixed-schema document&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;del&gt;In this scenario, neither node reported an error about a mixed-schema document because neither node was primary when this document was scanned.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;We have to follow the same approach we do with all &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a4bd3ce3607d2c3020d7efa3501240ae4b1a1b03/src/mongo/db/index/index_access_method.cpp#L1027-L1028&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;constraint violations&lt;/a&gt;, which is record them on all nodes and have the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a4bd3ce3607d2c3020d7efa3501240ae4b1a1b03/src/mongo/db/index_builds_coordinator.cpp#L2813-L2814&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;committing primary confirm whether these violations still exist&lt;/a&gt;, and handle them at commit time.&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;This can cause &lt;a href=&quot;http://example.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;CannotCreateIndex&lt;/tt&gt; to escape from the index build&lt;/a&gt; which is not allowed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2126369">SERVER-69264</key>
            <summary>Fail time-series index builds due to mixed schema only at commit time</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="13201">Fixed</resolution>
                                        <assignee username="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="louis.williams@mongodb.com">Louis Williams</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Aug 2022 08:40:30 +0000</created>
                <updated>Sun, 29 Oct 2023 21:33:48 +0000</updated>
                            <resolved>Wed, 5 Oct 2022 18:06:21 +0000</resolved>
                                                    <fixVersion>6.2.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4880431" author="xgen-internal-githook" created="Wed, 5 Oct 2022 18:03:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Noma&apos;, &apos;email&apos;: &apos;gregory.noma@gmail.com&apos;, &apos;username&apos;: &apos;gregorynoma&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69264&quot; title=&quot;Fail time-series index builds due to mixed schema only at commit time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69264&quot;&gt;&lt;del&gt;SERVER-69264&lt;/del&gt;&lt;/a&gt; Fail time-series index builds due to mixed schema only at commit time&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/006fee088ba3235e427dbdeeeba74e0964e63aa1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/006fee088ba3235e427dbdeeeba74e0964e63aa1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4876772" author="gregory.noma" created="Tue, 4 Oct 2022 15:26:01 +0000"  >&lt;p&gt;This isn&apos;t actually a bug due to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/de38a0768992b14b13a010f80a350bc5f7f1d942/src/mongo/db/catalog/multi_index_block.cpp#L932-L943&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this check at commit time&lt;/a&gt;. I&apos;ve updated the ticket accordingly.&lt;/p&gt;</comment>
                            <comment id="4791052" author="louis.williams" created="Wed, 31 Aug 2022 08:42:58 +0000"  >&lt;p&gt;I noticed this bug because I saw the addition of CannotCreateIndex to &lt;a href=&quot;https://github.com/mongodb/mongo/commit/8b405630fc1506abf620aaf4b08363d015327c9b#diff-062bb4d678c573c3475bdf62a95033c6ec09fb14f4334cbd5f416b05bcbc9780R2187&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this assertion&lt;/a&gt;. We shouldn&apos;t be adding any error codes to that list, because in almost all cases, this indicates a potential bug like the one I described.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="1894022">SERVER-60577</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>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 4 Oct 2022 15:26:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 18 weeks 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![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>
                            1 year, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i18gxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0jf9z:x</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6331">Execution Team 2022-10-03</customfieldvalue>
    <customfieldvalue id="6332">Execution Team 2022-10-17</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|i1832n:</customfieldvalue>

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