[SERVER-37066] Invalid BSON size when copying databases Created: 10/Sep/18  Updated: 10/Sep/18  Resolved: 10/Sep/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Xenia Siskaki [X] Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

While trying to copy databases from v2.4 to v3.2, I got the following error

 

Error while copying {
 
"ok" : 0,
 "errmsg" : "BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: _id: ObjectId('560a2c1ec9679dd3c4c83c41')",
 "code" : 10334
}

 



 Comments   
Comment by Ramon Fernandez Marina [ 10/Sep/18 ]

XeniaSiskaki, this error indicates there was a problem with at least one of your documents. This error is indicative of data corruption, which is often caused by a faulty storage layer. I'd recommend backing up your data files first, and then using repairDatabase; if that doesn't work, you may want to explore the possibility of using mongodump --repair to salvage your documents.

Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Comment by Xenia Siskaki [X] [ 10/Sep/18 ]

Sorry clicked "Create" too early. The executed command is the following:

mongo --quiet --eval "db.copyDatabase(\"test\", \"test\", \"localhost:27018\")"

and is executed via a bash script. The script is basically doing a migration from v2.4 to v3.2

Generated at Thu Feb 08 04:44:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.