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

WiredTigerRecordStore::seek recomputes table URI string length each time

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • None
    • None
    • None
    • Storage Execution
    • Fully Compatible
    • Execution Team 2024-02-05

    Description

      https://github.com/10gen/mongo/blob/af39933b7e530cf1e582093fa06197ec6dd7799a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L2182

          // Implicit construction of StringData:
          metricsCollector.incrementOneCursorSeek(c->uri); 

      This line of code implicitly constructs a StringData from a const char*, which results in a call to strlen every time we seek on a record store cursor. While this is not an enormous cost, it has shown up in some profiles I've taken.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: