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

Reuse ShardKeyPattern object from collection metadata in the write path

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding EMEA 2021-12-27

    Description

      write_stage_common::skipWriteToOrphanDocument constructs a new ShardKeyPattern object from the shard key pattern BSON obj it gets from the collection metadata. This construction of a ShardKeyPattern object could be avoided by exposing the collection metadata's ShardKeyPattern object itself. This small optimization can be meaningful in the hot write path.

      The same pattern can be optimized in update_stage and upsert_stage

      Attachments

        Activity

          People

            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: