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

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
            Reporter:
            Kshitij Gupta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: