<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:17:24 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-48532] [4.2] IndexBuildInterceptor::areAllWritesApplied may return false despite all records being visibly applied</title>
                <link>https://jira.mongodb.org/browse/SERVER-48532</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Due to a not-well-understood bug in hybrid index builds, we can count (in-memory) more side writes applied than we recorded. This has not caused any data inconsistencies but may cause the server to crash in very rare scenarios.&lt;/p&gt;

&lt;p&gt;As of, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44507&quot; title=&quot;Hybrid index build is able to commit (acquire stronger mode locks) for a collection that contains prepared documents. (4.2 only)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44507&quot;&gt;&lt;del&gt;SERVER-44507&lt;/del&gt;&lt;/a&gt;, even when the side-writes table is visibly empty, we will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5f8ebd1f27e3dbfa27e75bac39ac6730a0b6719b/src/mongo/db/index/index_build_interceptor.cpp#L369&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;return &apos;false&apos;&lt;/a&gt; when &lt;tt&gt;writesRecorded&lt;/tt&gt; does not equal &lt;tt&gt;_numApplied&lt;/tt&gt; such that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5f8ebd1f27e3dbfa27e75bac39ac6730a0b6719b/src/mongo/db/catalog/index_build_block.cpp#L161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this invariant fails&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If &lt;tt&gt;_numApplied&lt;/tt&gt;, the number of keys read from the side table and written into the index, is less than &lt;tt&gt;writesRecorded&lt;/tt&gt;, the number inserted into the side table, this suggests there are keys not visible in our snapshot. We could complete the index build with inconsistencies. This was addressed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44507&quot; title=&quot;Hybrid index build is able to commit (acquire stronger mode locks) for a collection that contains prepared documents. (4.2 only)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44507&quot;&gt;&lt;del&gt;SERVER-44507&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;If, however, &lt;tt&gt;_numApplied&lt;/tt&gt; is greater than &lt;tt&gt;writesRecorded&lt;/tt&gt;, this suggests we either double-counted or double-applied a key. Double counting would suggest a bug in the code that tracks inserts. These counters are only used for progress reporting and invariants, so I am not concerned about this. Double-inserting could be concerning, but indexes allow key overwrites, so we would never introduce an inconsistency in this case, we would just overwrite a previous key.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I would suggest modifying the logic to only return &apos;false&apos; if &lt;tt&gt;_numApplied&lt;/tt&gt; is less than &lt;tt&gt;numRecorded&lt;/tt&gt;. This partially reverts to the behavior of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-44507&quot; title=&quot;Hybrid index build is able to commit (acquire stronger mode locks) for a collection that contains prepared documents. (4.2 only)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-44507&quot;&gt;&lt;del&gt;SERVER-44507&lt;/del&gt;&lt;/a&gt;, such that we log a warning, but always return &apos;true&apos; if these counts differ.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1368793">SERVER-48532</key>
            <summary>[4.2] IndexBuildInterceptor::areAllWritesApplied may return false despite all records being visibly applied</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="13201">Fixed</resolution>
                                        <assignee username="gregory.noma@mongodb.com">Gregory Noma</assignee>
                                    <reporter username="louis.williams@mongodb.com">Louis Williams</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Jun 2020 23:16:21 +0000</created>
                <updated>Sun, 29 Oct 2023 22:07:33 +0000</updated>
                            <resolved>Wed, 17 Jun 2020 15:58:52 +0000</resolved>
                                                    <fixVersion>4.2.9</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3212292" author="xgen-internal-githook" created="Wed, 17 Jun 2020 14:50:06 +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-48532&quot; title=&quot;[4.2] IndexBuildInterceptor::areAllWritesApplied may return false despite all records being visibly applied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48532&quot;&gt;&lt;del&gt;SERVER-48532&lt;/del&gt;&lt;/a&gt; Return true from IndexBuildInterceptor::areAllWritesApplied() if _numApplied is greater than writesRecorded&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3a382a875bd687774ff20d297086398a97298da3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3a382a875bd687774ff20d297086398a97298da3&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.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, 16 Jun 2020 20:32:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 34 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>
                            3 years, 34 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>

                        </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>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|hxo1uf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxb8hj:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3938">Execution Team 2020-06-29</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|hxno3r:</customfieldvalue>

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