[SERVER-6887] mongorestore silently ignores documents with invalid field names starting with $ Created: 29/Aug/12 Updated: 29/Aug/12 Resolved: 29/Aug/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | 2.0.7, 2.2.0-rc2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Stennie Steneker (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | mongorestore | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
In MongoDB 2.0.7 it is possible to update() a document and set an invalid field name starting with $:
If you mongodump and then mongorestore this database, documents with invalid field names are silently ignored (even with `mongorestore -vvvvv`). In MongoDB 2.2.0rc2 the attempt to update() does throw an exception:
.. but mongorestore still does not report any errors for skipped documents. |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 29/Aug/12 ] | |
|
Though it wasn't clearly documented as such, the error handling behaviour for mongorestore is "fire & forget" by design so this request actually duplicates the feature request of With verbose server logging an exception will be logged by mongod, eg:
A note has been added to the wiki page (http://www.mongodb.org/display/DOCS/Import+Export+Tools) and |