[SERVER-12305] Allow command request and response BSON objects to exceed 16MB Created: 09/Jan/14 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 12 |
| Labels: | asya, needs-scope, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
This is due to limitations in both the shell and command processing. This could be useful for things like allowing large write batches or allowing users to compute result documents larger than 16MB using the aggregation framework. The correct fix here is probably to remove the generic BSONObj limit entirely, and only enforce the limit when serializing to disk (16MB) or the network (48MB). |
| Comments |
| Comment by Asya Kamsky [ 10/May/18 ] | ||
|
Another use case - returning a large result to client in response to a command that gathers responses from many shards (in cases where it's not feasible to to return them as a cursor, example: explain on large sharded cluster with one of the more verbose options).
| ||
| Comment by A. Jesse Jiryu Davis [ 03/Mar/14 ] | ||
|
Another example: Inserting a nearly-16MB document with the shell's Bulk API succeeds with w: 1, but fails with a 100-character-long getLastErrorMode name: Error: Converting from JavaScript to BSON failed: Object size 16777334 exceeds limit of 16777216 bytes. | ||
| Comment by Andreas Nilsson [ 03/Mar/14 ] | ||
|
This is a more general problem than write commands. Running the following command with a > 16MB length bigString
gives the following error:
Allthough the command would fail on the server it fails in the shell for the "wrong" reasons. |