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

Avoid allocate and copy metadata if we successfully lookup existing bucket

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • 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

            yuhong.zhang@mongodb.com Yuhong Zhang
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: