[SERVER-83451] Remove unnecessary calls to stdx::visit in bulk write Created: 20/Nov/23 Updated: 31/Jan/24 Resolved: 31/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Vishnu Kaushik | Assignee: | Sean Zimmerman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | milestone-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Replication
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Repl 2024-01-08, Repl 2024-02-05 | ||||||||
| Participants: | |||||||||
| Description |
|
Sometimes, from metadata we have information already on what type of operation (insert / update / delete) an op is. In these cases, if it is possible to make a decision already, there is no need to call stdx::visit. For example, in this code we use stdx::visit and accordingly return an action type of ActionType::insert, etc. But since we already have the _type saved on construction, we can just use that to determine which action type to return. We should also investigate if saving any metadata about the operation (such as its nsInfo index) at the time of parsing would help us avoid these calls as well, since currently each time we want to fetch the nsInfo index we incur a stdx::visit call. |
| Comments |
| Comment by Githook User [ 31/Jan/24 ] |
|
Author: {'name': 'seanzimm', 'email': '102551488+seanzimm@users.noreply.github.com', 'username': 'seanzimm'}Message: GitOrigin-RevId: 5010131f446e1974d097c39f7d2b0b431251c81f |