<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:28: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-12293] initial sync of a capped collection can often fail if highly transient</title>
                <link>https://jira.mongodb.org/browse/SERVER-12293</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If a capped collection is hot, an initial sync of a new replica set member can often fail because the cursor gets overrun while syncing.&lt;br/&gt;
One possible solution is when detected on a syncing secondary, to stop cloning the collection, and let the oplog sync take care of it.&lt;br/&gt;
Note: if this happens, it could mean the oplog sync will never converge as well.&lt;/p&gt;


&lt;p&gt;&amp;#8211; OLD BELOW &amp;#8211;&lt;/p&gt;

&lt;p&gt;Any write to a full capped collection deletes old record(s).&lt;br/&gt;
The delete seems to invalidate all cursors on the collection,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/clientcursor.cpp#L251&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/db/clientcursor.cpp#L251&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Attempt to initial sync a capped collection with master/latest that&apos;s being inserted into:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2014-01-08T09:00:07.481-0800 [rsSync] 		cloning collection test.cap to test.cap on asyasmacbook.local:40001 with filter {}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2014-01-08T09:00:07.949-0800 [rsSync] replSet initial sync exception: 13127 getMore: cursor didn&apos;t exist on server, possible restart or timeout? 0 attempts remaining&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Note, failure is almost instant, unlike in 2.4 where such failure would happen &quot;eventually&quot; if the writes were &quot;fast enough&quot;.&lt;/p&gt;

&lt;p&gt;It appears that if the failure does not immediately happen, then the clone succeeds - possible timing interaction issue?&lt;/p&gt;</description>
                <environment></environment>
        <key id="105162">SERVER-12293</key>
            <summary>initial sync of a capped collection can often fail if highly transient</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="asya.kamsky@mongodb.com">Asya Kamsky</reporter>
                        <labels>
                            <label>PM248</label>
                            <label>former-robust-initial-sync</label>
                    </labels>
                <created>Wed, 8 Jan 2014 17:04:29 +0000</created>
                <updated>Tue, 6 Dec 2022 05:13:18 +0000</updated>
                                            <version>2.4.8</version>
                    <version>2.5.4</version>
                                                    <component>Replication</component>
                                        <votes>6</votes>
                                    <watches>20</watches>
                                                                                                                <comments>
                            <comment id="4180156" author="milkie" created="Wed, 10 Nov 2021 13:41:24 +0000"  >&lt;p&gt;Note that File Copy Based Initial Sync (or any snapshot-based initial sync) does not suffer from this issue.&lt;/p&gt;</comment>
                            <comment id="4116405" author="louis.williams" created="Mon, 11 Oct 2021 17:56:41 +0000"  >&lt;p&gt;Moving back to &quot;Open&quot; because the dependent ticket, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16049&quot; title=&quot;Replicate capped collection deletes explicitly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16049&quot;&gt;&lt;del&gt;SERVER-16049&lt;/del&gt;&lt;/a&gt;, was fixed in 5.0.&lt;/p&gt;</comment>
                            <comment id="487903" author="jfeibusc@ebay.com" created="Sun, 26 Jan 2014 09:51:37 +0000"  >&lt;p&gt;By specifying that option, the user is asserting that the capped collection wraps quickly. If that assertion is incorrect, then the secondary would be inconsistent. In that sense, it would be the same as the --fastsync option.&lt;/p&gt;</comment>
                            <comment id="487758" author="asya" created="Sat, 25 Jan 2014 09:19:00 +0000"  >&lt;p&gt;John, that&apos;s not possible as that would create a secondary that would possibly have empty  capped collection if there were no more inserts into it during the initial sync and after - the secondary couldn&apos;t enter SECONDARY status until it has a consistent copy of primary&apos;s data.&lt;/p&gt;</comment>
                            <comment id="485076" author="jfeibusc@ebay.com" created="Tue, 21 Jan 2014 19:34:19 +0000"  >&lt;p&gt;I think a possible solution would be to have some option to not copy the data in a capped collection during initial sync. That is, on the new node, the capped collection would be created with the same size as on the source node, but no data would be copied. The capped collection would still end up with the same data as the primary after one wrap. &lt;/p&gt;</comment>
                            <comment id="479380" author="asya" created="Thu, 9 Jan 2014 02:23:44 +0000"  >&lt;p&gt;Yes.   It seems a little easier to reproduce in 2.5.5-pre but I can consistently make it happen in both (just by starting a loop inserting into the capped collection on the primary right before starting initial sync of the secondary).&lt;/p&gt;</comment>
                            <comment id="479215" author="milkie" created="Wed, 8 Jan 2014 21:23:27 +0000"  >&lt;p&gt;Does this affect both 2.4 and master branch? (my guess is yes)&lt;/p&gt;</comment>
                            <comment id="479209" author="asya" created="Wed, 8 Jan 2014 21:19:09 +0000"  >&lt;p&gt;I think we&apos;ve confirmed that what happens is inserts arrive faster than getmore batches (this is more likely to happen with very large documents which force fewer docs in each batch) and delete the record the cursor for getmore is pointing to.&lt;/p&gt;</comment>
                            <comment id="478981" author="milkie" created="Wed, 8 Jan 2014 17:13:19 +0000"  >&lt;p&gt;From the description, it sounds like it affects more than syncing &amp;#8211; it would be very difficult / impossible to do a read scan of a capped collection if someone else is writing to it and it&apos;s already wrapped around.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="168240">SERVER-16049</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="367564">TOOLS-1636</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="485533">SERVER-32827</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_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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 8 Jan 2014 17:13:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 13 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/PM-223'>PM-223</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-16049'>SERVER-16049</a></s>]]></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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 13 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>jfeibusc@ebay.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm4br:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hreil3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4002</customfieldvalue>
                        </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|hsp0hz:</customfieldvalue>

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