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

Avoid calls to BSONObj::stripFieldNames in SortedDataIndexAccessMethod::findSingle

    • Storage Execution NAMER
    • Fully Compatible
    • Execution Team 2023-10-30

      In SortedDataIndexAccessMethod::findSingle, there is a call to BSONObj::stripFieldNames which walks the BSONObj and allocates a new one. For simple IDHack queries where _id is a scalar, this is unnecessary since field names are not stored in the keystring.

      I do not know if this function can be omitted in all cases though as I am not very familiar with key string.

      POC: https://github.com/10gen/mongo/commit/b2fe0cbb1697e55daa60991389e951bcc9eb8aed

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: