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

Remove unnecessary calls to stdx::visit in bulk write

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.3.0-rc2
    • None
    • None
    • Replication
    • Fully Compatible
    • Repl 2024-01-08, Repl 2024-02-05

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: