<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:55:52 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-62716] Handle spurious finishWaitingForOneOpTime in WaitForMajorityServiceTest</title>
                <link>https://jira.mongodb.org/browse/SERVER-62716</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As determined in BF-22420, there is a possibility that &lt;tt&gt;WaitForMajorityService&lt;/tt&gt; will call &lt;tt&gt;waitForWriteConcern&lt;/tt&gt; on a request that has been cancelled but has not been removed from its request collection yet.&lt;/p&gt;

&lt;p&gt;The service uses two background threads: one for processing requests (by waiting for replication) and the other for removing requests whose futures have been cancelled.&lt;/p&gt;

&lt;p&gt;This behavior can manifest if the cancelled request is at the front of the queue and the processing thread wakes up and &lt;a href=&quot;https://github.com/10gen/mongo/blob/754ea766abe5682738764d90b0d0c1d49600774a/src/mongo/db/repl/wait_for_majority_service.cpp#L204&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;acquires the mutex&lt;/a&gt; after the cancellation thread has &lt;a href=&quot;https://github.com/10gen/mongo/blob/754ea766abe5682738764d90b0d0c1d49600774a/src/mongo/db/repl/wait_for_majority_service.cpp#L176&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;marked the request as processed&lt;/a&gt; but &lt;em&gt;before&lt;/em&gt; it has &lt;a href=&quot;https://github.com/10gen/mongo/blob/754ea766abe5682738764d90b0d0c1d49600774a/src/mongo/db/repl/wait_for_majority_service.cpp#L178-L179&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;removed it from the collection&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While the behavior itself is not a bug, it does cause problems in &lt;tt&gt;WaitForMajorityServiceTest&lt;/tt&gt; where test logic assumes that the request has been handled only once. For example, &lt;tt&gt;CancelingEarlierOpTimeRequestDoesNotAffectLaterOpTimeRequests&lt;/tt&gt; calls &lt;tt&gt;finishWaitingOneOpTime&lt;/tt&gt; twice and assumes that the first request will have been processed after the first call and the second after the second call.&lt;/p&gt;

&lt;p&gt;One way to fix this would be to call &lt;tt&gt;getLastOpTimeWaited&lt;/tt&gt; after &lt;tt&gt;finishWaitingOneOpTime&lt;/tt&gt; and retry when necessary.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1965920">SERVER-62716</key>
            <summary>Handle spurious finishWaitingForOneOpTime in WaitForMajorityServiceTest</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="matt.diener@mongodb.com">Matt Diener</assignee>
                                    <reporter username="vojislav.stojkovic@mongodb.com">Vojislav Stojkovic</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Tue, 18 Jan 2022 17:35:02 +0000</created>
                <updated>Sun, 29 Oct 2023 21:44:00 +0000</updated>
                            <resolved>Wed, 23 Feb 2022 16:07:02 +0000</resolved>
                                                    <fixVersion>6.0.0-rc0</fixVersion>
                    <fixVersion>5.0.10</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4629898" author="xgen-internal-githook" created="Tue, 21 Jun 2022 17:37:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Diener&apos;, &apos;email&apos;: &apos;matt.diener@mongodb.com&apos;, &apos;username&apos;: &apos;mattdiener&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62716&quot; title=&quot;Handle spurious finishWaitingForOneOpTime in WaitForMajorityServiceTest&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62716&quot;&gt;&lt;del&gt;SERVER-62716&lt;/del&gt;&lt;/a&gt; Ensure finishWaitingOneOpTime actually progresses&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a16e998ad6b2d08485b71a29949909e8c3b44643&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a16e998ad6b2d08485b71a29949909e8c3b44643&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4369428" author="xgen-internal-githook" created="Tue, 22 Feb 2022 19:31:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Diener&apos;, &apos;email&apos;: &apos;matt.diener@mongodb.com&apos;, &apos;username&apos;: &apos;mattdiener&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62716&quot; title=&quot;Handle spurious finishWaitingForOneOpTime in WaitForMajorityServiceTest&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62716&quot;&gt;&lt;del&gt;SERVER-62716&lt;/del&gt;&lt;/a&gt; Ensure finishWaitingOneOpTime actually progresses&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c1ce0d4518d9122230c0d0cf373cb488f34af021&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c1ce0d4518d9122230c0d0cf373cb488f34af021&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4325641" author="matthew.saltz" created="Mon, 31 Jan 2022 19:30:57 +0000"  >&lt;p&gt;After discussion in triage, it seems like this is a problem with a test rather than the service. The race described &lt;em&gt;can&lt;/em&gt; happen in production, but it&apos;s not actually a problem since we just end up waiting for an opTime that we&apos;d eventually surpass anyway. So we should just fix the unit test.&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>
                    </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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23140"><![CDATA[v5.3]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.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, 31 Jan 2022 19:30:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 33 weeks, 1 day 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, 33 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.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>matt.diener@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
            <customfieldvalue>vojislav.stojkovic@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0h7a7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i00b7j:</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="5934">Service Arch 2022-2-21</customfieldvalue>
    <customfieldvalue id="5944">Service Arch 2022-03-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|i0gtfj:</customfieldvalue>

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