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

Pass only number of keys in shouldMarkIndexAsMultiKey

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Labels:
      None
    • Fully Compatible
    • Execution Team 2019-11-04

      In AbstractIndexAccessMethod::insert/update and a few other places, we call shouldMarkIndexAsMultikey passing a vector of keys. Because the caller only has a set, it needs to copy all keys into a vector. However, shouldMarkIndexAsMultikey really only needs to know the number of keys, so we should stop passing the vector and doing the conversion.

      Fixing this adds 3.3% to validation speed, and should speed up index operations in general.

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: