[SERVER-2744] Incorrect diskloc tracking when migrations exceed max BSON size Created: 11/Mar/11  Updated: 12/Jul/16  Resolved: 11/Mar/11

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

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File migrateBigger.js    
Operating System: ALL
Participants:

 Description   

When migrated BSON objects hit size limit, i.e.:

a.len() + o.objsize() + 1024 > BSONObjMaxUserSize

the iterator is decremented. When this iterator is used to erase disk locations, as in:

_cloneLocs.erase( _cloneLocs.begin() , i )

the semantics is to erase from [beginning to end) (note open end of interval). Therefore, the last disk loc returned will not be removed from the list, and extra objects will be returned. In the worst case when the objects are individually very large, the migration will send unlimited amounts of data since the disk locations will never increment.



 Comments   
Comment by auto [ 11/Mar/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: fix migrate with oversize docs SERVER-2744 180
https://github.com/mongodb/mongo/commit/742349b0184a97ec31f99b32551035f0b8ef0b83

Comment by auto [ 11/Mar/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: test for SERVER-2744
https://github.com/mongodb/mongo/commit/27c2d5f2a276b5bc90d4de703932d1c0885dabdf

Comment by auto [ 11/Mar/11 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: fix migrate with oversize docs SERVER-2744 180
https://github.com/mongodb/mongo/commit/3d6f23651f9df9974f02595d8f402f28f1fc361d

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