[SERVER-5452] Assertion: 10334:Invalid BSONObj error when doing Map/Reduce Created: 29/Mar/12 Updated: 10/Aug/12 Resolved: 30/Apr/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | 2.0.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Riley | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL 5.8 |
||
| Issue Links: |
|
||||||||
| Operating System: | Linux | ||||||||
| Participants: | |||||||||
| Description |
|
Hello all, I have been using Mongo in non-sharded mode for quite sometime and have just recently tried my hand at sharding data. To do so I have 3 machines setup as mongod with 1 of them also serving as my mongos and config server. I have ~212 thousand documents in the sharded collection but each document has what can be a pretty long array. This dataset was working fine for about a day but after doing an update where I added a new field to most of the documents I am getting the following error: Thu Mar 29 14:56:22 [conn5166] Assertion: 10334:Invalid BSONObj size: 18303487 (0xFF491701) first element: 0: { count: 6294467.0 }The complete log from mongos is here:
I have tried running repairDatabase(), which ran successfully but does not take care of the problem. I have also run validate() on the collection and validate() reports everything as OK (even when run in verbose mode). I am able to query this database without error however I am unable to perform the map reduce described above (which is counting a subset of the array elements and doing a group by). I am able to perform a map reduce on the elements of the document NOT contained in the array. I am not sure how much of this information is helpful but I thought I would include it just in case. Any help on this would be greatly appreciated. |
| Comments |
| Comment by Nic Cottrell (Personal) [ 09/Aug/12 ] | ||||||||||||||||||||||||||||
|
I just got this error too. Would it be possible to change the error to something like "BSON size exceeds max of 16MB" ? | ||||||||||||||||||||||||||||
| Comment by Antoine Girbal [ 30/Apr/12 ] | ||||||||||||||||||||||||||||
|
this error means that one document being created during MR is larger than the max size of 16MB. | ||||||||||||||||||||||||||||
| Comment by David Riley [ 30/Mar/12 ] | ||||||||||||||||||||||||||||
|
Hi Eliot, The map and reduce functions are below, note that the look a little funky because they are embedded in a perl script: Map:
Reduce:
So the idea in that map is that I can pass in some conditions (as key value pairs) to check for in the array elements. I a a particular value from the array element and that is what is getting counted. | ||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 30/Mar/12 ] | ||||||||||||||||||||||||||||
|
Can you send the map and reduce function you are using? |