Performance: LockState::isLocked() should be optimized

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.2.0
    • Component/s: Internal Code, Performance
    • None
    • Sharding
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The LockState::isLocked() function beginning on line 59 in src/mongo/db/lockstate.cpp is a low-level routine that is called heavily. It should be modified to be less expensive. It is generally called with a database name (not a full database.collection name) but it always makes a local copy of the portion that appears before the first period, which is usually the full string. If there are cases where a full namespace name is used, that should be a different version of this routine. If this routine is only called with database names, the string copy should be removed.

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: