<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:53 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-3367] Minor Data Loss for Slave (master/slave setup)</title>
                <link>https://jira.mongodb.org/browse/SERVER-3367</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Our current master db server had no enough RAM, so I tried manually switch one of the slave to master. &lt;br/&gt;
After stopping update master db, and wait for sufficient time to got slave catch up. I checked the count of the collections, but found that there&apos;s minor loss of documents. ( master: 99344270;  slave 1: 99344259, 11 docs lost; slave 2: 99344251, 19 docs lost.). It&apos;s unacceptable for a DB that loss data. &lt;/p&gt;

&lt;p&gt;Following is the stats: &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;master (after stop doing updates)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&amp;gt; db.printReplicationInfo()&lt;br/&gt;
configured oplog size:   25000MB&lt;br/&gt;
log length start to end: 502311secs (139.53hrs)&lt;br/&gt;
oplog first event time:  Wed Jun 29 2011 19:12:30 GMT+0800 (CST)&lt;br/&gt;
oplog last event time:   Tue Jul 05 2011 14:44:21 GMT+0800 (CST)&lt;/p&gt;

&lt;p&gt;&amp;gt; db.my_collection.count()&lt;br/&gt;
99344270&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;on slave 1&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&amp;gt; db.my_collection.count()&lt;br/&gt;
99344259&lt;/p&gt;

&lt;p&gt;*on slave 2&lt;br/&gt;
&amp;gt; db.my_collection.count()&lt;br/&gt;
99344251&lt;/p&gt;</description>
                <environment>ubuntu server 10.10 64bit</environment>
        <key id="19078">SERVER-3367</key>
            <summary>Minor Data Loss for Slave (master/slave setup)</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="kristina">Kristina Chodorow</assignee>
                                    <reporter username="stonegao">Stone, Gao</reporter>
                        <labels>
                            <label>dataloss</label>
                    </labels>
                <created>Tue, 5 Jul 2011 07:14:59 +0000</created>
                <updated>Tue, 12 Jul 2016 00:20:21 +0000</updated>
                            <resolved>Thu, 19 Jan 2012 16:51:39 +0000</resolved>
                                    <version>1.8.0</version>
                    <version>1.8.2</version>
                                                    <component>Replication</component>
                    <component>Stability</component>
                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="80988" author="kristina" created="Thu, 19 Jan 2012 16:51:26 +0000"  >&lt;p&gt;Please open a new issue if you see this in 2.0.2.&lt;/p&gt;</comment>
                            <comment id="74122" author="stonegao" created="Sat, 17 Dec 2011 07:45:01 +0000"  >&lt;p&gt;We have an old slave using mongodb 2.0.1, which has the initial sync data loss bug, so some docs lost after the initial sync. I mean if this bug only happens when setup a slave and do the initial sync, docs added after the initial sync should not got lost. &lt;/p&gt;

&lt;p&gt;For example:  After initial sync: Master has 10000 docs, but slave only got 9000 docs after initial sync due to the bug. # docs on Master - # docs on slave should always equal 1000 if the bug only effects the initial stage. Otherwise, if data loss bug also happens after initial sync the gap between M/S will be larger than (&amp;gt;) 1000&lt;/p&gt;

&lt;p&gt;But last week I noticed that our old slave running 2.0.1 didn&apos;t pick up the docs added in the Master DB after the initial sync. I will keep an eye on the data loss issue of the new slave (2.0.2). Hope it will never happen. &lt;/p&gt;</comment>
                            <comment id="74119" author="eliot" created="Sat, 17 Dec 2011 07:07:19 +0000"  >&lt;p&gt;What do you mean 2 docs got lost?&lt;br/&gt;
They were then weren&apos;t there without a delete?&lt;br/&gt;
Can you open a ticket with as much information as possible.&lt;/p&gt;</comment>
                            <comment id="74118" author="stonegao" created="Sat, 17 Dec 2011 06:42:19 +0000"  >&lt;p&gt;Thanks for your hard work. It seems that 2.0.2 fixed the initial sync data loss bug. &lt;/p&gt;

&lt;p&gt;Are your sure the data loss bug only effects initial sync? I noticed that two docs lost again after the initial sync on our old slave (2.0.1). If that bug only happens at initial sync, the follow-up docs should not disappear on slave.&lt;/p&gt;</comment>
                            <comment id="74067" author="kristina" created="Fri, 16 Dec 2011 22:25:12 +0000"  >&lt;p&gt;Can you please try 2.0.2 and make sure that it works correctly for you?&lt;/p&gt;</comment>
                            <comment id="69891" author="auto" created="Wed, 30 Nov 2011 19:26:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;kchodorow&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: add tests for recloning missing docs &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3367&quot; title=&quot;Minor Data Loss for Slave (master/slave setup)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3367&quot;&gt;&lt;del&gt;SERVER-3367&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e54996c81083c363057f9840886719c77e75c4d6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e54996c81083c363057f9840886719c77e75c4d6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66575" author="auto" created="Mon, 14 Nov 2011 16:24:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;kchodorow&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: Generalize recloning docs on initial oplog application &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3367&quot; title=&quot;Minor Data Loss for Slave (master/slave setup)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3367&quot;&gt;&lt;del&gt;SERVER-3367&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conflicts:&lt;/p&gt;

&lt;p&gt;	db/repl.cpp&lt;br/&gt;
	db/repl/rs_sync.cpp&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/154f5545b6c6708146d0215408b4029e72a021dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/154f5545b6c6708146d0215408b4029e72a021dd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66524" author="eliot" created="Mon, 14 Nov 2011 13:37:22 +0000"  >&lt;p&gt;Stone,&lt;/p&gt;

&lt;p&gt;Thanks for the feedback. You are correct that I missed this case in my statement about immediate fixes and it should have been fixed much faster once the bug was found. Thanks for pointing it out. We appreciate pointers from the community when we screw up.&lt;/p&gt;

&lt;p&gt;What issues with sharding are you referring to?  Just the count() being eventually consistent? Its only off during a migration, and you can always do an index scan to get the exact global number if you need.&lt;/p&gt;

&lt;p&gt;Are you still seeing problems with larger than ram data sets in 2.0?  There are lots of improvements in 2.0, more coming in 2.2.&lt;/p&gt;

&lt;p&gt;-Eliot&lt;/p&gt;</comment>
                            <comment id="66490" author="stonegao" created="Mon, 14 Nov 2011 08:40:40 +0000"  >&lt;p&gt;@Dwight thanks for your advices, finally, I got this helpful expected responsible response after 4 months!&lt;/p&gt;

&lt;p&gt;I followed the recent buzz about &apos;Don&#8217;t use MongoDB&apos; , although the original author confessed that it&apos;s a hoax, admit or not, it did tell some truth about mongodb and most part of the article is truth and it&apos;s not FUD.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Don&apos;t use MongoDB&lt;br/&gt;
&lt;a href=&quot;http://pastebin.com/raw.php?i=FD3xe6Jt&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://pastebin.com/raw.php?i=FD3xe6Jt&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Response from Eliot Horowitz&lt;br/&gt;
&lt;a href=&quot;http://news.ycombinator.com/item?id=3202959&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://news.ycombinator.com/item?id=3202959&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Media response&lt;br/&gt;
&lt;a href=&quot;http://www.readwriteweb.com/cloud/2011/11/hacker-news-and-the-damage-don.php&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.readwriteweb.com/cloud/2011/11/hacker-news-and-the-damage-don.php&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;I have some thing to say and I am not sure whether this is the right place, we like mongodb and thanks for you guys at 10gen invest so much effort to keep mongodb evolving so fast.  But as a long time mongodb user (since 1.6.x) and also have built high load write heavy products with mongodb, I think it&apos;s time to give some feedbacks about the problems of mongodb.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;1. Be honest and face the reality.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We engineers are born to solve tech problems. There&apos;s no bug-free software. But when bugs do happen, we should just face the damn reality and try our best to find the bug, review the source code and fix it ASAP.&lt;/p&gt;

&lt;p&gt;For the problem of data loss, @Eliot (maybe also 10gen) was not honest and was trying to hide the truth that data loss did happen. I submitted this bug 4 months ago and @Eliot was involved.&lt;br/&gt;
Also @kristina confirmed at Oct 19 2011 : &quot; Yes. We also had a couple of other people run into the bug and try it on their own workloads and we&apos;re working on a more deterministic testing frameworks for intial syncing.&quot;&lt;/p&gt;

&lt;p&gt;But @Eliot responded the post with the following:&lt;/p&gt;

&lt;p&gt;&quot;There has never been a case of a record disappearing that we either have not been able to trace to a bug that was fixed immediately, or other environmental issues. If you can link to a case number, we can at least try to understand or explain what happened. Clearly a case like this would be incredibly serious, and if this did happen to you I hope you told us and if you did, we were able to understand and fix immediately.&quot;&lt;/p&gt;

&lt;p&gt;And 10gen president Max Schireson with the following:&lt;/p&gt;

&lt;p&gt;&quot;we do not believe there have been substantiated reports of data loss when the system is used in the recommended way.&quot;&lt;/p&gt;

&lt;p&gt;Maybe you guys finally figured out that data loss is critical for a database. But problems don&apos;t solved by hiding the truth, it&apos;s solved by being honest and face the reality and invest more effort on hard and most important problems.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;2. Critical things first.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Yes. Mongodb&apos;s api is sweet and it&apos;s quick for prototyping and low load usage. MongoDB&apos;s version # changes fast but the hard and important issues keeps unresolved.  from 1.6.x to the latest 2.0.1, durability (journaling) is the only critical things introduced. And sharding is still not very reliable. For most of the users, I think cool feature x,y,z is not that important (which might be for certain use cases), but data integrity, sharding reliability, fine grained locking, efficiency of storage  are critical things for all the users. You guys are smart. But please change the mongodb todo-list priority list, and fix the critical stuff before adding more cool features, thank you! ( We really don&apos;t want migrate so much legacy data to other solutions because of the long unresolved issues, but we are considering) &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;3. Things I think that needs more effort for mongodb and should considered as critical:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;1). Sharding reliability.&lt;br/&gt;
    We tried sharding in production but it failed (1.6.3).   I ranted on twitter about the bugs: &lt;a href=&quot;https://twitter.com/#!/stonegao/statuses/14526464011534337&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://twitter.com/#!/stonegao/statuses/14526464011534337&lt;/a&gt; , and since then I promise I will never touch mongodb auto-sharding until issues in Eliot&apos;s FourSquare postmortem got fixed, which I expected at that time this would in 2.0.x but it&apos;s not. So now we have to write our own Application Level Sharding lib to do manual sharding, which though painful but at least we are sure how many docs in our collections &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;2). Fine grained locking.&lt;/p&gt;

&lt;p&gt;    This is partially solved by one write intensive collection per db. But we can go no further, I think document level locking might be more helpful.&lt;/p&gt;

&lt;p&gt;3). Efficiency of storage.&lt;br/&gt;
    Schema-less is attractive at first glance. But anyway, we do need schema, as your collection grows, many storage space is wasted by keeping schema info in every docs. It&apos;s a problem when you need scale. it will be very helpful if mongodb can support schema definition.&lt;/p&gt;

&lt;p&gt;4). More reliable storage and memory management engine&lt;/p&gt;

&lt;p&gt;    Performance degraded rapidly when our data can&apos;t put in RAM. Sometimes we noticed that mongodb stopped respond every 10s when faults. If mongodb can be as deterministic  as mysql when data not fit in RAM, it will be pretty helpful for large data sets.&lt;/p&gt;

&lt;p&gt;Above is just my personal feedbacks and opinions as a long time mongodb user. Hope it helps make mongodb better and better a little bit.  Thanks again for your hard work to give us an alternative when choosing database.&lt;/p&gt;

&lt;p&gt;Stone &lt;/p&gt;</comment>
                            <comment id="66323" author="auto" created="Fri, 11 Nov 2011 23:26:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;kchodorow&apos;, u&apos;name&apos;: u&apos;Kristina&apos;, u&apos;email&apos;: u&apos;kristina@10gen.com&apos;}
&lt;p&gt;Message: Generalize recloning docs on initial oplog application &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3367&quot; title=&quot;Minor Data Loss for Slave (master/slave setup)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3367&quot;&gt;&lt;del&gt;SERVER-3367&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c99abec538e30a337d911b1f84a1121b6500531c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c99abec538e30a337d911b1f84a1121b6500531c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66199" author="dwight_10gen" created="Fri, 11 Nov 2011 14:51:51 +0000"  >&lt;p&gt;@kristina you are right the fix is not in master/slave only in replica sets.  703ca00a5749c8660d7a975c9d03ae585d790ddb marks the line that needs work in the code.&lt;/p&gt;

&lt;p&gt;@stone kristina will fix.  possible solutions:&lt;/p&gt;

&lt;p&gt;(1) use a build which has the replica set fix mentioned above, and use replica sets instead of master/slave.  if you are doing an initial sync this is just as easy as a fresh slave instantiation anyway.  this is a good idea as future work on replication will mostly be on replica sets; master/slave is the &quot;old&quot; replication in mongo.&lt;br/&gt;
(2) the problem only occurs during &quot;initial sync&quot;. thus one workaround is to do no writes on the master while doing the slave&apos;s initial sync.&lt;br/&gt;
(3) wait for kristina to implement fix.&lt;/p&gt;</comment>
                            <comment id="65782" author="kristina" created="Wed, 9 Nov 2011 22:17:09 +0000"  >&lt;p&gt;I&apos;ll let you know as soon as there&apos;s something to try.  I got sick last week and just got back.  I haven&apos;t fixed anything yet, but I&apos;ll try to figure it out tomorrow.  &lt;/p&gt;</comment>
                            <comment id="64694" author="stonegao" created="Fri, 4 Nov 2011 12:48:40 +0000"  >&lt;p&gt;tried again with 2.0.1 for a small collection (~ 1M docs), sync&apos;ed a new slave, 1433 docs lost. &lt;/p&gt;</comment>
                            <comment id="63950" author="kristina" created="Tue, 1 Nov 2011 14:20:02 +0000"  >&lt;p&gt;I just realized you&apos;re using master/slave and the fixes we did only help replica sets.  Let me look into master-slave and see if I can make an analogous fix.&lt;/p&gt;</comment>
                            <comment id="63595" author="eliot" created="Sun, 30 Oct 2011 20:23:07 +0000"  >&lt;p&gt;Is it possible to give us a copy of your dataset?&lt;/p&gt;

&lt;p&gt;We can make this ticket private to do so.&lt;/p&gt;</comment>
                            <comment id="63577" author="stonegao" created="Sun, 30 Oct 2011 16:02:44 +0000"  >&lt;p&gt;Tried 2.0.1, first time 679 docs lost, second time 116 docs lost. I pray to God every time I sync a slave from the big collection db, hoping not losing data.&lt;/p&gt;</comment>
                            <comment id="61441" author="kristina" created="Wed, 19 Oct 2011 17:33:04 +0000"  >&lt;p&gt;Yes.  We also had a couple of other people run into the bug and try it on their own workloads and we&apos;re working on a more deterministic testing frameworks for intial syncing.&lt;/p&gt;</comment>
                            <comment id="58745" author="stonegao" created="Thu, 6 Oct 2011 01:41:37 +0000"  >&lt;p&gt;Waiting for the 2.0.1 release, hope it will fix this critical bug. &lt;/p&gt;

&lt;p&gt;Btw: how you guys test the bug? Do you have some big data set with a write(update) intensive master?&lt;/p&gt;</comment>
                            <comment id="58697" author="kristina" created="Wed, 5 Oct 2011 21:17:05 +0000"  >&lt;p&gt;Any update on this?&lt;/p&gt;</comment>
                            <comment id="56266" author="kristina" created="Fri, 23 Sep 2011 20:49:29 +0000"  >&lt;p&gt;These are the three major commits related to it:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fa6ebc65bee94d2514f28afe5c6094f352dd28d3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fa6ebc65bee94d2514f28afe5c6094f352dd28d3&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5857346b9b726637c7bf46d2a8ac4a0539d5da85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5857346b9b726637c7bf46d2a8ac4a0539d5da85&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/00ebd4c1f9272dffa901634b715111f7b5136200&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/00ebd4c1f9272dffa901634b715111f7b5136200&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don&apos;t bother trying it the dev release until Monday, though. The build was broken last night so the last fix didn&apos;t make it into the binaries available for download.&lt;/p&gt;</comment>
                            <comment id="56100" author="stonegao" created="Fri, 23 Sep 2011 06:48:40 +0000"  >&lt;p&gt;can you point out which git commit (or issue #) that might fixed the bug ?  &lt;/p&gt;</comment>
                            <comment id="55936" author="kristina" created="Thu, 22 Sep 2011 16:19:04 +0000"  >&lt;p&gt;Can you try with the Development Release (Unstable) Nightly from &lt;a href=&quot;http://www.mongodb.org/downloads?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/downloads?&lt;/a&gt;  We fixed a bug this week that could have caused data loss on initial sync.&lt;/p&gt;</comment>
                            <comment id="55842" author="stonegao" created="Thu, 22 Sep 2011 09:58:45 +0000"  >&lt;p&gt;Can you guys verify this by creating a write intensive master with more that 100M docs, and sync a slave and see whether it losses data? It&apos;s so frequent that not losing data is such a rare case. &lt;/p&gt;</comment>
                            <comment id="55836" author="stonegao" created="Thu, 22 Sep 2011 08:47:12 +0000"  >&lt;p&gt;Will time effect replication? I noticed that time on master and slave are different. &lt;/p&gt;</comment>
                            <comment id="55835" author="stonegao" created="Thu, 22 Sep 2011 08:45:17 +0000"  >&lt;p&gt;I never tried delete mongod.lock. &lt;/p&gt;

&lt;p&gt;Using 1.8.3 currently, did experiment just now. 30k+ docs lost again. &lt;/p&gt;</comment>
                            <comment id="52567" author="kristina" created="Tue, 6 Sep 2011 15:06:35 +0000"  >&lt;p&gt;The slave is either losing data because of a bug in MongoDB or an operator error on your end.  We are trying to figure out which.  Attaching any and all logs you have would help us do this.&lt;/p&gt;

&lt;p&gt;Have you ever deleted a mongod.lock file before starting any of the servers?&lt;/p&gt;

&lt;p&gt;(Please do not restrict your comments to be viewable to users.)&lt;/p&gt;</comment>
                            <comment id="52418" author="stonegao" created="Sun, 4 Sep 2011 17:06:48 +0000"  >&lt;p&gt;Tried with mongodb 1.8.3. Again 259 documents lost with the aforementioned collection and 3 documents lost in another collection (of total ~300k documents). How come slaves loses data frequently? &lt;/p&gt;</comment>
                            <comment id="40591" author="eliot" created="Tue, 5 Jul 2011 14:17:27 +0000"  >&lt;p&gt;All logs&lt;/p&gt;</comment>
                            <comment id="40563" author="stonegao" created="Tue, 5 Jul 2011 12:52:35 +0000"  >&lt;p&gt;which log do you need ? log for slave 1 or master ? &lt;/p&gt;</comment>
                            <comment id="40560" author="eliot" created="Tue, 5 Jul 2011 12:36:35 +0000"  >&lt;p&gt;Different versions aren&apos;t an issue.&lt;br/&gt;
The full logs going back as far as you can are needed before trying to understand any more.&lt;/p&gt;</comment>
                            <comment id="40559" author="stonegao" created="Tue, 5 Jul 2011 12:30:07 +0000"  >&lt;p&gt;Actually, I didn&apos;t do the switch until I wait for a long time hoping the slaves would catch up then gave up because there&apos;s no oplogs to apply anymore. &lt;/p&gt;

&lt;p&gt;The master(1.8.0) running with no journalling and no  unclean shutdown. I setup slave1  (mongodb 1.8.2) last night, and there&apos;s no unclean shutdown. &lt;/p&gt;

&lt;p&gt;Will different versions of mongodb cause data loss with master/slave setup? &lt;/p&gt;</comment>
                            <comment id="40530" author="eliot" created="Tue, 5 Jul 2011 07:19:14 +0000"  >&lt;p&gt;You&apos;ll need to provide some history to understand what happened.&lt;br/&gt;
Can you send the logs from when you did the switch?&lt;br/&gt;
Are you running with journalling?&lt;br/&gt;
If not - was there ever an unclean shutdown on nodes?&lt;br/&gt;
When is the last time you verified counts or have backups?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="24868">SERVER-4270</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="22847">SERVER-3956</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>32.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 5 Jul 2011 07:19:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 4 weeks, 6 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/SERVER-4270'>SERVER-4270</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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 4 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
            <customfieldvalue>stonegao</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrowiv:</customfieldvalue>

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

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

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