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

Change interface for updateWithSuppliedFacet and update

    • Fully Compatible
    • v5.2, v4.4
    • 2

      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.

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

              Created:
              Updated:
              Resolved: