<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:00:09 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-42312] Validate during rollback can cause count mismatch</title>
                <link>https://jira.mongodb.org/browse/SERVER-42312</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When validate is run, it marks a collection as always needing size adjustment. This causes rollback to assume that oplog application will correct the record store sizes, even though it won&apos;t if we have rolled back any inserts or deletes that change the size (and don&apos;t account for those).&lt;/p&gt;

&lt;p&gt;If validate is called after we call RTT, then it should be marked for size adjustment, and if it is called before RTT it shouldn&apos;t be. We clear the &quot;mark for size adjustment&quot; state before each rollback, so it can really only be relevant to validates that happen during the rollback. I think we shouldn&apos;t allow validate while we&apos;re rolling back, and we should not mark collections for size adjustment on validate since it&apos;s unnecessary.&lt;/p&gt;</description>
                <environment></environment>
        <key id="870039">SERVER-42312</key>
            <summary>Validate during rollback can cause count mismatch</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="pavithra.vetriselvan@mongodb.com">Pavithra Vetriselvan</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Jul 2019 14:51:35 +0000</created>
                <updated>Sun, 29 Oct 2023 22:18:56 +0000</updated>
                            <resolved>Tue, 24 Sep 2019 18:58:42 +0000</resolved>
                                                    <fixVersion>4.2.1</fixVersion>
                    <fixVersion>4.3.1</fixVersion>
                    <fixVersion>4.0.14</fixVersion>
                                    <component>Replication</component>
                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4115473" author="xgen-internal-githook" created="Mon, 11 Oct 2021 12:55:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benety Goh&apos;, &apos;email&apos;: &apos;benety@mongodb.com&apos;, &apos;username&apos;: &apos;benety&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-52976&quot; title=&quot;[4.2] collection_validation.cpp isn&amp;#39;t used anywhere in the 4.2 branch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52976&quot;&gt;&lt;del&gt;SERVER-52976&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42312&quot; title=&quot;Validate during rollback can cause count mismatch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42312&quot;&gt;&lt;del&gt;SERVER-42312&lt;/del&gt;&lt;/a&gt; disallow validate cmd during rollback and recovering states&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1a3936b3ee365de5dde80e440c01fa6e868a1a54)&lt;br/&gt;
(cherry picked from commit 82e34b0d86c6625b5a67d1909e1dcc434f78be82)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3ac74aad2a2b70ad5b1ccb97b07a92c52a51f2f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3ac74aad2a2b70ad5b1ccb97b07a92c52a51f2f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2490224" author="xgen-internal-githook" created="Fri, 18 Oct 2019 17:27:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pavithra.vetriselvan@mongodb.com&apos;, &apos;name&apos;: &apos;Pavithra Vetriselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42312&quot; title=&quot;Validate during rollback can cause count mismatch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42312&quot;&gt;&lt;del&gt;SERVER-42312&lt;/del&gt;&lt;/a&gt; disallow validate cmd during rollback and recovering states&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1a3936b3ee365de5dde80e440c01fa6e868a1a54)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/82e34b0d86c6625b5a67d1909e1dcc434f78be82&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/82e34b0d86c6625b5a67d1909e1dcc434f78be82&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2489920" author="xgen-internal-githook" created="Fri, 18 Oct 2019 15:25:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Pavithra Vetriselvan&apos;, &apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pavithra.vetriselvan@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42312&quot; title=&quot;Validate during rollback can cause count mismatch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42312&quot;&gt;&lt;del&gt;SERVER-42312&lt;/del&gt;&lt;/a&gt; disallow validate cmd during rollback and recovering states&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 1a3936b3ee365de5dde80e440c01fa6e868a1a54)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/186079301dc9de56313f5a8e84e6088fec289ded&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/186079301dc9de56313f5a8e84e6088fec289ded&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2431588" author="xgen-internal-githook" created="Tue, 24 Sep 2019 18:43:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;pvselvan&apos;, &apos;email&apos;: &apos;pavithra.vetriselvan@mongodb.com&apos;, &apos;name&apos;: &apos;Pavithra Vetriselvan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-42312&quot; title=&quot;Validate during rollback can cause count mismatch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-42312&quot;&gt;&lt;del&gt;SERVER-42312&lt;/del&gt;&lt;/a&gt; disallow validate cmd during rollback and recovering states&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1a3936b3ee365de5dde80e440c01fa6e868a1a54&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1a3936b3ee365de5dde80e440c01fa6e868a1a54&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2338815" author="judah.schvimer" created="Tue, 23 Jul 2019 14:04:44 +0000"  >&lt;p&gt;With RTT the answer is a bit complicated. If you use &quot;recoverFromOplogAsStandalone&quot;, then you&apos;ll validate either the old branch of history or the new branch of history, but not an &quot;in between&quot; state. Without that flag you&apos;ll validate an arbitrary point in time in the past that was consistent at that point in time, relative to the oplog (not reflecting any prepared transactions). Both of these should appear consistent, and I would expect that fastcount should remain correct since we don&apos;t have any &quot;marking for size adjustment&quot; quirks outside of rollback occurring.&lt;/p&gt;

&lt;p&gt;We should test that this standalone workaround works.&lt;/p&gt;</comment>
                            <comment id="2338580" author="bruce.lucas@10gen.com" created="Tue, 23 Jul 2019 12:47:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt;, yes, that was my question, only indirectly related to this ticket.&lt;/p&gt;</comment>
                            <comment id="2337212" author="judah.schvimer" created="Mon, 22 Jul 2019 18:44:58 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bruce.lucas&quot; class=&quot;user-hover&quot; rel=&quot;bruce.lucas&quot;&gt;bruce.lucas&lt;/a&gt;, do you mean can validate return false indications of inconsistency if you shut down a node in &quot;rollback&quot; or &quot;recovering&quot; state and restart it as a standalone and then call validate?&lt;/p&gt;</comment>
                            <comment id="2336898" author="bruce.lucas@10gen.com" created="Mon, 22 Jul 2019 16:43:01 +0000"  >&lt;p&gt;I don&apos;t see any problem with that, provided it is in fact possible to do validate when you start up standalone in recovering state. That raises one question though: can validate return any false indications of inconsistency in that state?&lt;/p&gt;

&lt;p&gt;cc: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kelsey.schubert&quot; class=&quot;user-hover&quot; rel=&quot;kelsey.schubert&quot;&gt;kelsey.schubert&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.hatcher&quot; class=&quot;user-hover&quot; rel=&quot;daniel.hatcher&quot;&gt;daniel.hatcher&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2336791" author="judah.schvimer" created="Mon, 22 Jul 2019 16:08:27 +0000"  >&lt;p&gt;I looked into this with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;, the easiest and most canonical fix would be that the validate command should set &lt;tt&gt;maintenanceOk&lt;/tt&gt; to false, the default is true. This would also mean that nodes in &quot;Recovering&quot; could not run &lt;tt&gt;validate&lt;/tt&gt; without starting up as a standalone. If you can&apos;t do reads during &quot;Recovering&quot; state, it makes sense to not be able to run validate, which is inherently a read. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alyson.cabral&quot; class=&quot;user-hover&quot; rel=&quot;alyson.cabral&quot;&gt;alyson.cabral&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bruce.lucas&quot; class=&quot;user-hover&quot; rel=&quot;bruce.lucas&quot;&gt;bruce.lucas&lt;/a&gt;, does this seem reasonable and do you think it&apos;s fine to start erroring when running &lt;tt&gt;validate&lt;/tt&gt; while in &quot;Recovering&quot; and &quot;Rollback&quot;?&lt;/p&gt;</comment>
                            <comment id="2336572" author="judah.schvimer" created="Mon, 22 Jul 2019 14:54:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;, what do you think about making validate return a &lt;tt&gt;NotMasterOrSecondary&lt;/tt&gt; error while in rollback? &lt;/p&gt;

&lt;p&gt;And Geert and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=benety.goh&quot; class=&quot;user-hover&quot; rel=&quot;benety.goh&quot;&gt;benety.goh&lt;/a&gt; (I think you touched this code in storage two phase drops), do you agree that marking collections for size adjustment in validate is wrong?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="959978">SERVER-43843</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="967822">SERVER-43972</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1548452">SERVER-52976</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="543446">SERVER-34976</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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.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>Mon, 22 Jul 2019 16:43:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 17 weeks, 2 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_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>
                            2 years, 17 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>16.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>bruce.lucas@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>pavithra.vetriselvan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvgk6f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hv5lnb:</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="3200">Repl 2019-08-26</customfieldvalue>
    <customfieldvalue id="3201">Repl 2019-09-09</customfieldvalue>
    <customfieldvalue id="3202">Repl 2019-09-23</customfieldvalue>
    <customfieldvalue id="3260">Repl 2019-10-07</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|hvg6fr:</customfieldvalue>

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