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

Measure the overhead from ShardingWriteRouter on the write codepath

    XMLWordPrintable

Details

    • Fully Compatible
    • v5.0
    • Sharding 2021-10-04
    • 70
    • 2

    Description

      This test should be written as a google/benchmark test (see this wiki page and chunk_manager_refresh_bm.cpp as an example).

      Outside of the

      for (auto keepRunning : state) { ... }

      loop, the benchmark should construct a CatalogCache that will return a ChunkManager for the temporary resharding collection which has 60 chunks (to match the number of chunks in ReshardCollectionMixed.yml). It'll additionally need to call CollectionShardingRuntime::setFilteringMetadata() for the source collection with a CollectionMetadata that has reshardingFields present and in a state such that getReshardingKeyIfShouldForwardOps() would return the new shard key pattern.

      Within the

      for (auto keepRunning : state) { ... }

      loop, the benchmark should construct a ReshardingDonorWriteRouter instance and call ReshardingDonorWriteRouter::getDestinedRecipient() for a fixed document. The document should be constructed outside of the loop so that the BSONObjBuilder for it isn't counted in the benchmark.

      Attachments

        Issue Links

          Activity

            People

              luis.osta@mongodb.com Luis Osta (Inactive)
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: