<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:49:29 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-18994] producer thread can continue producing after a node becomes primary</title>
                <link>https://jira.mongodb.org/browse/SERVER-18994</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;These ops are not thrown away and can lead to a deadlock between the applier and producer threads. The applier thread believes it has finished and is waiting for the producer thread to signal that it has paused. Meanwhile, the producer thread is waiting for the op that arrived late (which the applier is unaware of) to be applied.&lt;/p&gt;</description>
                <environment></environment>
        <key id="210978">SERVER-18994</key>
            <summary>producer thread can continue producing after a node becomes 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="9">Done</resolution>
                                        <assignee username="matt.dannenberg">Matt Dannenberg</assignee>
                                    <reporter username="matt.dannenberg">Matt Dannenberg</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Jun 2015 16:24:28 +0000</created>
                <updated>Mon, 16 Nov 2015 15:58:57 +0000</updated>
                            <resolved>Tue, 7 Jul 2015 18:32:54 +0000</resolved>
                                    <version>3.0.1</version>
                                    <fixVersion>3.0.5</fixVersion>
                    <fixVersion>3.1.6</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="959823" author="xgen-internal-githook" created="Tue, 7 Jul 2015 18:32:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dannenberg&apos;, u&apos;name&apos;: u&apos;matt dannenberg&apos;, u&apos;email&apos;: u&apos;matt.dannenberg@10gen.com&apos;}
&lt;p&gt;Message:  &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18994&quot; title=&quot;producer thread can continue producing after a node becomes primary&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18994&quot;&gt;&lt;del&gt;SERVER-18994&lt;/del&gt;&lt;/a&gt; rework applier draining to avoid possible deadlock&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b373e66d9aca09e73040c8bbeb54bacdb91883fb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b373e66d9aca09e73040c8bbeb54bacdb91883fb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="959800" author="xgen-internal-githook" created="Tue, 7 Jul 2015 18:15:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;dannenberg&apos;, u&apos;name&apos;: u&apos;matt dannenberg&apos;, u&apos;email&apos;: u&apos;matt.dannenberg@10gen.com&apos;}
&lt;p&gt;Message:  &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18994&quot; title=&quot;producer thread can continue producing after a node becomes primary&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18994&quot;&gt;&lt;del&gt;SERVER-18994&lt;/del&gt;&lt;/a&gt; rework applier draining to avoid possible deadlock&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a07e5b9e9c31bba5d8d6da61c17c2231cb396323&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a07e5b9e9c31bba5d8d6da61c17c2231cb396323&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="958664" author="milkie" created="Mon, 6 Jul 2015 18:03:41 +0000"  >&lt;p&gt;In addition, we should remove setting _isWaitingForDrainToComplete to false in _updateMemberStateFromTopologyCoordinator_inlock()  (it&apos;s not really valid to do this, as the only time it will be true is when there are still ops to process)&lt;/p&gt;

&lt;p&gt;The next thing that should happen is that all connections are closed, which will cause the producer thread to jump back up to the top of produce(), where it will detect we&apos;re in drain mode and call pause().  Finally, the applier thread will eventually block waiting for the producer thread to call pause, and then clear _isWaitingForDrainToComplete.&lt;br/&gt;
In this way, we don&apos;t need to block heartbeat stepdowns.&lt;/p&gt;</comment>
                            <comment id="956643" author="milkie" created="Thu, 2 Jul 2015 14:07:50 +0000"  >&lt;p&gt;I suggest taking out the place in the produce where it waits for the applier to drain the buffer.  It was added for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8070&quot; title=&quot;Flush buffer before changing sync targets to prevent unnecessary rollbacks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8070&quot;&gt;&lt;del&gt;SERVER-8070&lt;/del&gt;&lt;/a&gt; but there appears to be no reason to keep doing it now.  Instead, we can just check for drain mode at bgsync.cpp:213 and return if we&apos;re draining.&lt;/p&gt;</comment>
                            <comment id="952094" author="scotthernandez" created="Fri, 26 Jun 2015 18:05:04 +0000"  >&lt;p&gt;After discussion, we have a plan to return errors if draining and role==leader when asked to transition to secondary. This should cover the following transition points, at least:  &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Reconfig&lt;/li&gt;
	&lt;li&gt;StepDown&lt;/li&gt;
	&lt;li&gt;Heartbeats&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="239535">SERVER-21474</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>5.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_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="15441">3.0.5</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>Fri, 26 Jun 2015 18:05:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 32 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_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>scotthernandez</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 32 weeks, 1 day 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>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>matt.dannenberg</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hriy67:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsad53:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="574">RPL 6 07/17/15</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|hsfxmn:</customfieldvalue>

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