[SERVER-44619] BtreeKeyGenerator::_extractNextElement() uassert message exceeds 16mb BSON document limit when added to a command result Created: 14/Nov/19 Updated: 29/Oct/23 Resolved: 15/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1, 4.2.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.2
|
||||||||
| Sprint: | Execution Team 2019-11-18 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 11 | ||||||||
| Description |
|
When we attempt to index a document that is ambiguous for the key pattern {‘a.0’: 1}, BtreeKeyGenerator::_extractNextElement() includes the contents of the array field in the uassert error message, with error code 16746. When the command processing subsystem converts this UserAssertion into a Status for the createIndexes command result, the result may exceed the 16 MB BSON document limit, leading to a different error code BSONObjectTooLarge returned in the final result. This obscures the original source of the indexing error. To reproduce:
|
| Comments |
| Comment by Githook User [ 11/Dec/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit e6deb004dfb74bbf0c381597185ea7cf88a9a812) |
| Comment by Githook User [ 11/Dec/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 3f4312f26e1667826db51a0d2834eb417bb5de2d) |
| Comment by Githook User [ 14/Nov/19 ] |
|
Author: {'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}Message: |
| Comment by Githook User [ 14/Nov/19 ] |
|
Author: {'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}Message: |