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

Change interface for updateWithSuppliedFacet and update

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.3.0, 4.4.12
    • None
    • Fully Compatible
    • v5.2, v4.4
    • 2

    Description

      Currently, we have the following code located here:

          auto container = getOrCreateFaultFacetsContainer();
          auto facet = container->getFaultFacet(checkStatus.getType());
          if (!facet) {
              const auto type = checkStatus.getType();
              auto newFacet =
                  new FaultFacetImpl(type, _svcCtx->getFastClockSource(), std::move(checkStatus));
              container->updateWithSuppliedFacet(type, FaultFacetPtr(newFacet));
          } else {
              facet->update(std::move(checkStatus));
          }
      

      Meaning that in order to update a health check result we need to know about two different functions facet->update and container->updateWithSuppliedFacet. We should collapse this to one function, update, such that it will automatically created the facet if needed.

      Attachments

        Activity

          People

            davis.haupt@mongodb.com Davis Haupt
            lamont.nelson@mongodb.com Lamont Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: