Mark Payne created NIFI-16304:
---------------------------------

             Summary: Connector verification results expire prematurely when 
another verification is submitted
                 Key: NIFI-16304
                 URL: https://issues.apache.org/jira/browse/NIFI-16304
             Project: Apache NiFi
          Issue Type: Bug
         Environment: Reproduced on Apache NiFi 2.12.0-SNAPSHOT with a system 
test against a running standalone NiFi instance.
            Reporter: Mark Payne


Submitting a connector configuration verification request can prematurely 
remove another completed verification request. Subsequent attempts to retrieve 
that result return HTTP 404, although verification succeeded.

{{ConnectorResource}} initializes its verification request manager with an 
expiration value of {{1L}}. The {{AsyncRequestManager}} constructor interprets 
this value as milliseconds. Each new submission removes completed requests 
older than that interval.

Ordinary submit -> poll -> delete usage works. The issue occurs when another 
verification is submitted before the client finishes retrieving or deleting an 
earlier result.

*Steps to reproduce:*
# Create two connectors.
# Submit configuration verification A and wait for successful completion, 
retaining the request.
# Wait 100 ms and confirm A remains retrievable.
# Submit configuration verification B for the other connector.
# Retrieve A again.

*Actual result:* HTTP 404, "Could not find a Request with identifier ...".

*Expected result:* A remains available for the intended retention period unless 
explicitly deleted.

This sequence was reproduced with a system test against a running NiFi 
instance. Both verifications succeeded; retrieving A after submitting B failed 
with HTTP 404.

*Proposed fix:* Pass {{TimeUnit.MINUTES.toMillis(1L)}} to the request manager. 
The connector purge request manager uses the same incorrect {{1L}} value and 
should also be corrected; the system-test reproduction currently covers 
verification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to