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

When health observer returns status failure it will never run again

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • Sharding 2022-02-07
    • 178
    • 2

    Description

      Bug is introduced by SERVER-59365, this commit.

      The previous code was pass-through when `periodicCheckImpl()` returns the Future with failed status, now it just returns. The continuation is required to set the `_currentlyRunningHealthCheck` back to false in any outcome. With this bug, the health observer will never run again.

      My assessment is that the LDAP health observer should not be affected because it is designed to never return a Status failure, it returns the HealthCheckStatus object with result fields set to failure.

      The fix should:
      1. return the code logic back to pass-through
      2. write a unit test with mock observer to throw a Status error
      3. double check the LDAP observer code that this is indeed not a problem

      Attachments

        Activity

          People

            kshitij.gupta@mongodb.com Kshitij Gupta
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: