[SERVER-71979] Allow comparing JS objects over 16MB with BSON comparison functions Created: 08/Dec/22 Updated: 29/Aug/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Romans Kasperovics | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Query Execution
|
||||
| Participants: | |||||
| Description |
|
Currently we expose useful BSON comparison functions in mongo shell that can be used on JavaScript objects:
All functions perform JS -> BSON translation, which fails if object size exceeds 16MB. I would argue this limitation can be lifted here, because the functions do not store objects in the database. |
| Comments |
| Comment by Romans Kasperovics [ 11/Jan/23 ] |
|
steve.tarzia@mongodb.com : Only if we want to compare large JSON objects in tests. There was only one test doing it so far and I had to change it to work with my new implementation of assert.docEq(). In other words, I had to replace assert.docEq(coll1.find().toArray(), coll2.find().toArray()) with assert.eq(coll1.count(), coll2.count()) and assert.eq(coll1.hashAllDocs(), coll2.hashAllDocs()). |