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

Eliminate remaining redundant $db parses

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • Labels:
      None
    • Service Arch

      SERVER-88205 did away with a number of redundant parses of the $db field on common command paths in mongod, but there are still a few other places where we parse it more than once. We should update these to reuse the already parsed $db if possible, either by caching the value once we parse it or by reusing the already-parsed value found in CommandInvocation::db().

      A few places where this parsing is likely redundant:

      • replica_set_endpoint_util.cpp
      • killExhaust in session_workflow.cpp
      • cluster_find_cmd.h
      • cluster_pipeline_cmd_{s,d}.cpp
      • Any command that inherits from BasicCommand (updating to TypedCommand will fix this for free)

      When picking up this ticket, grep for "parseDbName" to find the various call sites.

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: