<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:29:27 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-32185] Freshly synced secondaries respond to queries before their &quot;sync time&quot;</title>
                <link>https://jira.mongodb.org/browse/SERVER-32185</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The last phase of a secondary performing initial sync is to apply oplog operations up through some time `T` representing when the collection cloning phase completed. It&apos;s incorrect for a secondary to respond to majority read/at a timestamp queries before time T.&lt;/p&gt;

&lt;p&gt;When a secondary comes out of initial sync, it will still have a notion of the replica sets majority commit time. Because the majority commit time is translated to a &quot;read at a timestamp&quot;, the secondary will incorrectly respond to a query, but with a view of inconsistent data.&lt;/p&gt;

&lt;p&gt;A couple starting points for solutions:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;An API was introduced for recover to a stable timestamp known as the &quot;initial data timestamp&quot; that replication sets when initial sync completes. This represents the timestamp at which the data is in a consistent state. This could be used to reject/block incoming majority reads/read at a timestamp requests.&lt;/li&gt;
	&lt;li&gt;Alternatively, a secondary can refuse to come out of initial sync until the majority commit point passes `T`. Currently there is no mechanism to tell drivers which timestamps a node can service reads for. This solution would be a way to signal to drivers to not send majority reads the node cannot service, at the cost of not participating in reads `&amp;gt;= T`.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="468757">SERVER-32185</key>
            <summary>Freshly synced secondaries respond to queries before their &quot;sync time&quot;</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="13202">Works as Designed</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="daniel.gottlieb@mongodb.com">Daniel Gottlieb</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Dec 2017 15:31:26 +0000</created>
                <updated>Fri, 27 Oct 2023 13:54:04 +0000</updated>
                            <resolved>Fri, 8 Dec 2017 21:51:51 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1747458" author="daniel.gottlieb@10gen.com" created="Fri, 8 Dec 2017 21:51:51 +0000"  >&lt;p&gt;I think I flubbed making this ticket. After talking with &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;, taking a fresh look at trying to reproduce with logs on master, I think what I was observing was really &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32187&quot; title=&quot;Metadata changes on secondaries don&amp;#39;t advance the min majority read timestamp enough&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32187&quot;&gt;&lt;del&gt;SERVER-32187&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1747395" author="judah.schvimer" created="Fri, 8 Dec 2017 21:17:22 +0000"  >&lt;p&gt;Per conversation with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt;, it appears that doing majority reads at the stable timestamp should be sufficient. We seem to be doing exactly this, so it&apos;s unclear what&apos;s going on. This will still leave us open to a rollback right after initial sync requiring a resync. From &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-32237&quot; title=&quot;Nodes that cannot become primary must neither update progress nor vote &amp;quot;aye&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-32237&quot;&gt;&lt;del&gt;SERVER-32237&lt;/del&gt;&lt;/a&gt;, that may be impossible to avoid without requiring users to initiate their nodes as non-voting and then reconfig them to be voting members. &lt;/p&gt;</comment>
                            <comment id="1744295" author="judah.schvimer" created="Wed, 6 Dec 2017 16:51:19 +0000"  >&lt;p&gt;I like the user visible behavior of staying in initial sync rather than restarting initial sync if we roll back shortly after leaving initial sync. My only concern is relying on secondaries in initial sync to commit writes. Per conversation with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=milkie&quot; class=&quot;user-hover&quot; rel=&quot;milkie&quot;&gt;milkie&lt;/a&gt;, this is no different than behavior we have today, and it should work, but it definitely feels weird.&lt;/p&gt;</comment>
                            <comment id="1744277" author="daniel.gottlieb@10gen.com" created="Wed, 6 Dec 2017 16:37:49 +0000"  >&lt;blockquote&gt;&lt;p&gt;I suggest we just never set the committed snapshot to an inconsistent snapshot. We should be able to do something similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30577&quot; title=&quot;Clear list of stable timestamp candidates on Rollback and Initial Sync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30577&quot;&gt;&lt;del&gt;SERVER-30577&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That may be a reasonable option as well. I didn&apos;t think replication kept its &quot;moved out of initial sync&quot; time and that&apos;s why we introduced a &lt;tt&gt;setInitialDataTimestamp&lt;/tt&gt; time. But, if I&apos;m wrong, I don&apos;t see any fundamental reason why your suggestion wouldn&apos;t work.&lt;/p&gt;</comment>
                            <comment id="1744247" author="milkie" created="Wed, 6 Dec 2017 16:19:58 +0000"  >&lt;p&gt;In 3.6 we no longer create any named snapshots, so there is no longer any &quot;blessing&quot; mechanism &amp;#8211; the logic is completely different now.&lt;/p&gt;</comment>
                            <comment id="1744238" author="daniel.gottlieb@10gen.com" created="Wed, 6 Dec 2017 16:11:12 +0000"  >&lt;p&gt;3.6 yes, 3.4 I don&apos;t think so. This should be backported, yes.&lt;/p&gt;</comment>
                            <comment id="1744210" author="judah.schvimer" created="Wed, 6 Dec 2017 15:52:34 +0000"  >&lt;p&gt;Why are we blessing snapshots as &quot;committed&quot; if they&apos;re inconsistent? I think we already have a mechanism for blocking reads when no majority snapshot is available. I suggest we just never set the committed snapshot to an inconsistent snapshot. We should be able to do something similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30577&quot; title=&quot;Clear list of stable timestamp candidates on Rollback and Initial Sync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30577&quot;&gt;&lt;del&gt;SERVER-30577&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1744201" author="judah.schvimer" created="Wed, 6 Dec 2017 15:47:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt;, Does this affect 3.6 and need to be backported?&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">
                                        <issuelink>
            <issuekey id="419727">SERVER-30809</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="470029">SERVER-32237</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="469944">SERVER-32226</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="414627">SERVER-30577</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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 6 Dec 2017 15:47:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 9 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-842</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>
                            6 years, 9 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>backlog-server-repl</customfieldvalue>
            <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htlowv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htd9xr:</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_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|htlb0v:</customfieldvalue>

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