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

Avoid allocate and copy metadata if we successfully lookup existing bucket

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Execution Team 2021-05-03, Execution Team 2021-05-17

      Description

      After SERVER-55213 we are no longer creating a modified metadata BSONObj when creating BucketKey when inserting documents into timeseries buckets. If we can find a bucket before having to normalize the metadata, we should not have to make the copy of the metadata into a new BSONObj as we currently are doing at the beginning of BucketCatalog::insert.

      To be able to handle all the different shapes of incoming metadata (missing, scalars or subobjects). We need to change how it is stored inside BucketMetadata to be just the value buffer of the metadata BSONElement owned or unowned.

      If we need to store the BucketMetadata (creating new bucket etc) we need to copy and take ownership of the buffer.

        Attachments

          Activity

            People

            Assignee:
            yuhong.zhang Yuhong Zhang
            Reporter:
            henrik.edin Henrik Edin
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: