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

Simplify concurrency of directshardoperation log-message check

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Service Arch
    • Service Arch Prioritized List

    Description

      We log a message warning users about performing operations via a direct-connection to a shard if we haven't already done so in the last hour. We check if we have logged in the last hour by storing the time we last logged at, protecting access to that time with a global mutex (https://github.com/mongodb/mongo/blob/531c4daba675e1a8a5213af7823ac01bccf0e8f7/src/mongo/db/service_entry_point_common.cpp#L1821-L1833) and checking that time under the mutex (along with taking the current time) on the path of every operation subject to this check.
      This static mutex is therefore contended on by every direct-shard-operation thread. I think we can come up with a simpler way to control logging this message that doesn't require a mutex.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: