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

Return false in shouldActivateFailCommandFailPoint if the command does not have a valid namespace

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2020-02-24
    • 6

      shouldActivateFailCommandFailPoint is a predicate function for FailPoint::executeIf so it should never throw an error. With the current code, the function could throw an exception if the invocation does not have a valid namespace. This line should be wrapped in a try/catch and if an exception is caught, the function should return false since we do not want to enable failCommand anyway in that case.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: