Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-10059

Controller service could incorrectly be removed from cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.16.2
    • 1.17.0, 1.16.3
    • None
    • None

    Description

      The remove method in StandardControllerServiceProvider has two calls to remove the service from the cache, and one of them happens before the service is actually removed:

      https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceProvider.java#L542

      If the remove fails after this, the service is already removed from the cache. Later if someone asks for this service by id from the provider, it will return null because it is not in the cache anymore.

      A normal REST call shouldn't reach this case because it would call verifyDelete before getting here, and the delete shouldn't fail if it passed verify, but other backend code could potentially take a different path.

      Attachments

        Issue Links

          Activity

            People

              bbende Bryan Bende
              bbende Bryan Bende
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h