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

Simplify concurrency of directshardoperation log-message check

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Service Arch Prioritized List

      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.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: