<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:31:24 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-32827] Initial sync can fail when syncing a capped collection if the capped collection rolls over on the sync source</title>
                <link>https://jira.mongodb.org/browse/SERVER-32827</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is a problem with an initial sync. Several attempts have failed with the following error:&lt;br/&gt;
CappedPositionLost: CollectionScan died due to position in capped collection being deleted&lt;/p&gt;

&lt;p&gt;The capped collections size on which the errors are occured: 30 - 100 GB&lt;br/&gt;
On our workload the capped collections &quot;capacity&quot; (the time before each document is deleted) varies between 24 and 60 hours.&lt;/p&gt;

&lt;p&gt;Here are some more detailed info about the collections:&lt;/p&gt;

&lt;p&gt;Number of CappedPositionLost errors, collection name, capped size, capacity&lt;br/&gt;
6 DB1.collection1 - 40G - 2.46week&lt;br/&gt;
3 DB1.collection14 - 37G - min 56h&lt;br/&gt;
3 DB1.collection2 - 30G - min 36h&lt;br/&gt;
9 DB1.collection9 - 100G - min 24h&lt;/p&gt;

&lt;p&gt;The logs for the 7 failed attempts to perform the initial sync are attached.&lt;/p&gt;

&lt;p&gt;Currently there is only one alive instance is left in the replica set on our production system. Please help us to bring the replica up.&lt;/p&gt;</description>
                <environment>Master: MongoDB 3.4.5&lt;br/&gt;
Slave: MongoDB 3.4.10 (tried 3.4.5, the result was the same)&lt;br/&gt;
Storage driver: WiredTiger&lt;br/&gt;
Total DB size: 533 GB (/var/lib/mongodb dir size)&lt;br/&gt;
oplog size: 50 GB (log length start to end: 6-15 hours on our workload)&lt;br/&gt;
Hardware: HP DL360, CPU - 1x Xeon E5-2640 v3 @ 2.60GHz, 378 GB RAM, 4xSAS 2.5&amp;quot; 15K RAID 10, 1Gbit LAN.&lt;br/&gt;
</environment>
        <key id="485533">SERVER-32827</key>
            <summary>Initial sync can fail when syncing a capped collection if the capped collection rolls over on the sync source</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="plsfixmymongo">Sergey</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Jan 2018 09:11:56 +0000</created>
                <updated>Tue, 6 Dec 2022 03:40:43 +0000</updated>
                                                                            <component>Querying</component>
                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="4116404" author="louis.williams" created="Mon, 11 Oct 2021 17:56:30 +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="3663893" author="judah.schvimer" created="Mon, 15 Mar 2021 11:50:40 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sombrafam%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;sombrafam@gmail.com&quot;&gt;sombrafam@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for reaching out! &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; is currently in progress, which is a prerequisite for fixing this. After that is complete we will investigate if there is any further work needed to fix this bug.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Judah&lt;/p&gt;</comment>
                            <comment id="3663410" author="JIRAUSER1259044" created="Sun, 14 Mar 2021 15:52:16 +0000"  >&lt;p&gt;Hi folks,&#160; what would it take to fix this bug? We have a customer with this problem but I needed to understand if this is something easily fixable or would require large or&#160;structural changes to Mongo.&lt;/p&gt;</comment>
                            <comment id="1782063" author="plsfixmymongo" created="Tue, 23 Jan 2018 14:27:15 +0000"  >&lt;p&gt;I reproduced the problem on test environment. Please see the attached test.tar.gz. It contains a script to reproduce the problem and the logs of the test run from my computer. m1, m2 are two replicas. In the test a new replica (m3) is added and MongoDB gives the same error as the error we had on our production environment (CappedPositionLost).&lt;/p&gt;

&lt;p&gt;test.sh is a script to reproduce the problem with MongoDB when an initial sync of a replica fails.&lt;/p&gt;

&lt;p&gt;The problem occurs when there is a capped collection with a secondary index and high insert rate and a new replica performs the initial sync from the existing member of the replica set. By the time the new replica finishes building the indexes for the capped collection the collection&apos;s data is already washed out by the new data and the new replica reports CappedPositionLost error and the initial sync fails.&lt;/p&gt;

&lt;p&gt;How to run the test:&lt;br/&gt;
1. Install Docker. It is required to throttle MongoDB (the new replica) to make it build indexes long enough for the data in the capped collection to be washed out by the new data.&lt;br/&gt;
2. Put test.sh in a new folder.&lt;br/&gt;
3. cd into the new folder.&lt;br/&gt;
4. Run ./test.sh. All the logs and diagnostic.data are captured automatically and put into the current folder. test.log is a copy of the console&apos;s output. m*.log are logs of the mongodb instances. m3.log is a log of the new replica which failed to join the replica set. The logs of the new replica will also be printed to stdout.&lt;/p&gt;

&lt;p&gt;test.sh has been tested on MacBook Pro 15&quot; 2016 on Intel Core i7 and on Dell notebook with Intel Core i5 on Docker v17. If you have a slow CPU please increase DOCKER_NEW_REPLICA_CPUS parameter, or decrease otherwise.&lt;/p&gt;

</comment>
                            <comment id="1781066" author="mark.agarunov" created="Mon, 22 Jan 2018 18:32:04 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=plsfixmymongo&quot; class=&quot;user-hover&quot; rel=&quot;plsfixmymongo&quot;&gt;plsfixmymongo&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report. To get a better idea of what may be causing the &lt;tt&gt;CappedPositionLost&lt;/tt&gt; error could you please provide the following:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The complete log files from all affected &lt;tt&gt;mongod&lt;/tt&gt; nodes&lt;/li&gt;
	&lt;li&gt;Please archive (tar or zip) the &lt;tt&gt;$dbpath/diagnostic.data&lt;/tt&gt; directory from all affected mongod nodes.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This should give us some insight into this behavior. &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1781002" author="plsfixmymongo" created="Mon, 22 Jan 2018 17:56:00 +0000"  >&lt;p&gt;The capped collections have secondary indexes&lt;/p&gt;</comment>
                            <comment id="1780398" author="plsfixmymongo" created="Mon, 22 Jan 2018 09:13:34 +0000"  >&lt;p&gt;This issue is probably related to the subject: &lt;a href=&quot;https://jira.mongodb.org/browse/TOOLS-1636&quot; title=&quot;mongodump fails when capped collection position lost&quot; class=&quot;issue-link&quot; data-issue-key=&quot;TOOLS-1636&quot;&gt;TOOLS-1636&lt;/a&gt;&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="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="505617">SERVER-33652</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="105162">SERVER-12293</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="367564">TOOLS-1636</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="176407" name="mongo_initial_sync_20" size="139228" author="plsfixmymongo" created="Mon, 22 Jan 2018 09:11:53 +0000"/>
                            <attachment id="176595" name="test.tar.gz" size="1986689" author="plsfixmymongo" created="Tue, 23 Jan 2018 14:23:22 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000dVHfNQAW, 5002K00000jaSkxQAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 22 Jan 2018 18:32:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 17 weeks, 2 days 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>true</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, 17 weeks, 2 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>sombrafam@gmail.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
            <customfieldvalue>mark.agarunov</customfieldvalue>
            <customfieldvalue>plsfixmymongo</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htog5r:</customfieldvalue>

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

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