ReshardingMetrics getOperationElapsedTime needs to lock

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Billy Donahue
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: