[SERVER-68982] Key generation on single document can exceed index build sorter limit Created: 19/Aug/22  Updated: 18/Apr/23

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-68125 Index build on multi-key fields can c... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

A single, well-constructed document can generate enough large keys to exceed the sorter's memory limit.

One solution would be to prevent this from happening and just fail an index build in that case. For documents inserted outside of an index build, we can most likely use the same global index build memory limit. We would need to be careful to ensure users can delete these oversized documents or update them to conform to the new limit.

This is not a new problem and has likely existed for as long as MongoDB has existed.



 Comments   
Comment by Louis Williams [ 19/Aug/22 ]

Another solution, as max.hirschhorn@mongodb.com suggested would be to push the key generation to query and allow this to be spillable to disk.

Generated at Thu Feb 08 06:12:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.