[
https://issues.apache.org/jira/browse/NIFI-10059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryan Bende reassigned NIFI-10059:
----------------------------------
Assignee: Bryan Bende
> Controller service could incorrectly be removed from cache
> -----------------------------------------------------------
>
> Key: NIFI-10059
> URL: https://issues.apache.org/jira/browse/NIFI-10059
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.16.2
> Reporter: Bryan Bende
> Assignee: Bryan Bende
> Priority: Minor
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)