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

Resharding metrics should set donorState/RecipientState to kUnused if they are not initialized for currentOp report.

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.2, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0
    • Sharding 2021-07-12
    • 144

      When a shard is a donor and a recipient, it is possible to get into a state with a currentOp instance without one of donorState or recipientState set. Currently resharding metrics does not account for this and tries to dereference the uninitialized boost::optional  for donorState/recipientState causing a failure when building a currentOp report. To fix this, we can check whether donorState/recipientState are uninitialized and if so, use kUnused as the state to build the currentOp report.

            Assignee:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Reporter:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: