<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:09:38 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-25593] ReplicationCoordinatorImpl should hold DataReplicator with shared pointer</title>
                <link>https://jira.mongodb.org/browse/SERVER-25593</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The ReplicationCoordinatorImpl currently uses a unique pointer to hold onto the DataReplicator. When we call doInitialSync, the pointer is not locked, so another thread could reset the pointer before the call, like resync.&lt;/p&gt;

&lt;p&gt;Using a shared pointer will fix this and make it so we no longer needed to synchronize on the pointer use, only when replaced/swapped. Each user of the current DataReplicator would make a copy of the shared_ptr which will stay valid. The sequence of events &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Tests&lt;/b&gt;&lt;br/&gt;
A test to prove correctness will be concurrent resync requests during initial sync, or at all. Each resync will stop an existing initial-sync/resync and start a new initial sync, optionally waiting till completion.&lt;/p&gt;</description>
                <environment></environment>
        <key id="308691">SERVER-25593</key>
            <summary>ReplicationCoordinatorImpl should hold DataReplicator with shared pointer</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="scotthernandez">Scott Hernandez</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Aug 2016 20:31:29 +0000</created>
                <updated>Sat, 19 Nov 2016 00:04:31 +0000</updated>
                            <resolved>Mon, 26 Sep 2016 21:29:47 +0000</resolved>
                                                    <fixVersion>3.3.15</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1408485" author="xgen-internal-githook" created="Fri, 14 Oct 2016 13:00:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;scotthernandez&apos;, u&apos;name&apos;: u&apos;Scott Hernandez&apos;, u&apos;email&apos;: u&apos;scotthernandez@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25593&quot; title=&quot;ReplicationCoordinatorImpl should hold DataReplicator with shared pointer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25593&quot;&gt;&lt;del&gt;SERVER-25593&lt;/del&gt;&lt;/a&gt;: check shutdown/failure status during initial sync when acquiring lock.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/886db25408492ced7d84b1cc06956d1e8613b29e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/886db25408492ced7d84b1cc06956d1e8613b29e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1394103" author="xgen-internal-githook" created="Mon, 26 Sep 2016 21:26:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;scotthernandez&apos;, u&apos;name&apos;: u&apos;Scott Hernandez&apos;, u&apos;email&apos;: u&apos;scotthernandez@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-25593&quot; title=&quot;ReplicationCoordinatorImpl should hold DataReplicator with shared pointer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-25593&quot;&gt;&lt;del&gt;SERVER-25593&lt;/del&gt;&lt;/a&gt;: use shared_ptr for DataReplicator&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1e703b173478fd3dbef9611ec03d1d702ad5de02&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1e703b173478fd3dbef9611ec03d1d702ad5de02&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1383772" author="scotthernandez" created="Tue, 13 Sep 2016 20:50:22 +0000"  >&lt;p&gt;As discussed in person, this can happen with concurrent resync commands. I will update the description to make it more clear and what tests need to be included.&lt;/p&gt;</comment>
                            <comment id="1370935" author="milkie" created="Mon, 29 Aug 2016 18:06:58 +0000"  >&lt;p&gt;Can someone explain the situation where we have one DR that is still shutting down while a new one has started?&lt;/p&gt;</comment>
                            <comment id="1370642" author="schwerin" created="Mon, 29 Aug 2016 15:26:15 +0000"  >&lt;p&gt;I still don&apos;t understand. If you have to wait for the old DR to be fully shut down before starting a new one, you shouldn&apos;t need shared ownership. Keeping it by shared pointer seems like it&apos;s going to lead to bugs with two running DRs.&lt;/p&gt;</comment>
                            <comment id="1356943" author="judah.schvimer" created="Mon, 15 Aug 2016 15:38:03 +0000"  >&lt;p&gt;I don&apos;t think that would be safe, but we will make sure that we wait for the old DataReplicator to shutdown before starting the new one. Using a shared_ptr will allow the old DataReplicator to remain alive to shutdown after we swap the pointer for the new DataReplicator without having to maintain a lock over the DataReplicator. That way when a resync resets the pointer, there is no race, and the call to doInitialSync operates on a non-null DataReplicator (and then immediately is shutdown). &lt;/p&gt;</comment>
                            <comment id="1355970" author="schwerin" created="Fri, 12 Aug 2016 21:35:15 +0000"  >&lt;p&gt;But is it safe to start a new Data Replicator before you know the old one has stopped doing writes?&lt;/p&gt;</comment>
                            <comment id="1355968" author="judah.schvimer" created="Fri, 12 Aug 2016 21:31:36 +0000"  >&lt;p&gt;The goal is to allow one thread to shutdown the old data replicator and create a new one while the old one is still running. The old data replicator will then terminate since shutdown has been called and be destroyed. &lt;/p&gt;</comment>
                            <comment id="1355963" author="schwerin" created="Fri, 12 Aug 2016 21:25:26 +0000"  >&lt;p&gt;I&apos;m wary of using a shared_ptr. Who owns the repjlicator when the other thread resets the repl coord&apos;s data replicator pointer? Could this other thread then create a new data replicator while the old one still exists? Is that meaningful? Safe?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="319254">SERVER-26355</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>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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>Fri, 12 Aug 2016 21:25:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 17 weeks, 5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-248</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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 17 weeks, 5 days 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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</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|hrjz4f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrcd9z:</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="1022">Repl 2016-08-29</customfieldvalue>
    <customfieldvalue id="1231">Repl 2016-09-19</customfieldvalue>
    <customfieldvalue id="1232">Repl 2016-10-10</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|hseo3j:</customfieldvalue>

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