[SERVER-10518] repl writer worker can't have undefined in a query expression Created: 15/Aug/13 Updated: 11/Jul/16 Resolved: 26/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.4.3 |
| Fix Version/s: | 2.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Steffen | Assignee: | Matt Dannenberg |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 12.04.1 LTS Linux 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Minor Change | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
MongoDB secondaries crash if master succeeds to add a document with _id set to undefined. Document is : { _id: undefined, migrated: new Date(1376502667931) }Master successfull adds this document, writes it to the oplog. See attachment for error output. |
| Comments |
| Comment by Alexey Zhuchkov [ 25/Jun/14 ] |
|
Perhaps it makes sense to skip oplog operations with _id undefined in repl writer to avoid secondaries crash? |
| Comment by Alexey Zhuchkov [ 25/Jun/14 ] |
|
Removing such document if it already exists also cause secondaries to crash with same error on latest server version (mongodb 2.6.3). |
| Comment by auto [ 28/Sep/13 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| Comment by auto [ 28/Aug/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: |
| Comment by Matt Dannenberg [ 26/Aug/13 ] |
|
Turns out the capped collections issue isn't an issue and the test I saw fail was already failing. inb4, triple revert |
| Comment by auto [ 26/Aug/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: reapply " This reverts commit d0502e5bd74203d50ce5b4c8341de3ed01c6c508. |
| Comment by Matt Dannenberg [ 26/Aug/13 ] |
|
_id: undefined is the case in capped collections, hence the revert and reopening of this issue |
| Comment by auto [ 26/Aug/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: Revert " This reverts commit 27c3e7ede4c8d0e8b7e29ad46d010a276eb0aec6. |
| Comment by auto [ 26/Aug/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: |
| Comment by Matt Dannenberg [ 21/Aug/13 ] |
|
Great. Glad to hear it. Sorry for the trouble. |
| Comment by Steffen [ 21/Aug/13 ] |
|
We did a full resync of the secondaries. |
| Comment by Matt Dannenberg [ 16/Aug/13 ] |
|
We shouldn't be allowing the storage of any documents with an undefined _id. I have a fix for this in the works, it is scheduled to be in the 2.6 release. In the meantime, you can resync your secondaries from the primary either from scratch or using a copy of the primary's data files. Details are available on our Resync a Member of a Replica Set page. |
| Comment by Steffen [ 16/Aug/13 ] |
|
MongoDB Version 2.4.3 |
| Comment by Steffen [ 15/Aug/13 ] |
|
We are doing a migration with javascript code running in the mongo shell. Task: Copy a field value into _id. We have a document with a field 'targetID : String'. This document get's removed and saved again with _id replaced by this string. |
| Comment by Matt Dannenberg [ 15/Aug/13 ] |
|
I can't reproduce this. How did you get the document with _id:undefined into the database? What driver and version of mongod were you using? |