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

ReshardingMetrics getOperationElapsedTime needs to lock

    • Fully Compatible
    • ALL
    • Sharding 2021-04-05
    • 1

      boost::optional<Milliseconds> getOperationElapsedTime() const.

      This function was added recently and accesses the runningOperation TimeInterval

      https://github.com/mongodb/mongo/blob/fdaf29180e2c4218c99544bf377fc05dcc378fc5/src/mongo/db/s/resharding/resharding_metrics.cpp#L381

      without acquiring a lock on _mutex as required by

      https://github.com/mongodb/mongo/blob/fdaf29180e2c4218c99544bf377fc05dcc378fc5/src/mongo/db/s/resharding/resharding_metrics.h#L123 

       

            Assignee:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: