Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83451

Remove unnecessary calls to stdx::visit in bulk write

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • Repl 2024-01-08, Repl 2024-02-05

      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.

            Assignee:
            sean.zimmerman@mongodb.com Sean Zimmerman
            Reporter:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: