[SERVER-28189] Update with $set of many array elements can be super slow to apply Created: 03/Mar/17 Updated: 06/Dec/22 Resolved: 06/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.5.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | ./mongo o.js |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
See attached repro. I ran VTune on it and it seems to be 50% in FieldRefSet::insert and 50% in pathsupport::findLongestPrefix; see attached screenshot for details. |
| Comments |
| Comment by David Storch [ 06/Mar/17 ] |
|
We have already identified that conflict detection is a performance problem while updating large documents. I'm marking this ticket as a duplicate of |
| Comment by Eric Milkie [ 03/Mar/17 ] |
|
Running this repro on my desktop takes approximately 50 seconds. This is significant because it means that a replica set secondary would be locked for that period of time – all reads are blocked, and replication is also stalled until this op finishes applying. |