Alex Sherwin created NIFI-9176:
----------------------------------

             Summary: CSVReader @OnEnabled initializes in wrong order
                 Key: NIFI-9176
                 URL: https://issues.apache.org/jira/browse/NIFI-9176
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 1.14.0
            Reporter: Alex Sherwin


The built-in {{org.apache.nifi.csv.CSVReader}} has a few startup methods 
annotated with {{@OnEnabled}}

The documentation for {{@OnEnabled}} doesn't specify the order they are invoked 
in, however it appears they are sorted alphabetically (at least they are in 
1.14.0, it may have been different in earlier versions, it looks like that 
behavior may have changed in 1.14.0)

The problem in {{CSVReader}} is that {{storeSchemaAccessStrategy}} runs before 
{{storeStaticProperties}} since its first alphabetically.

But, this is the wrong order.  The {{storeSchemaAccessStrategy}} depends on 
some values that {{storeStaticProperties}} sets up.

Unfortunately it doesn't look like {{@OnEnabled}} documents any guaranteed 
ordering (so, is the current alphabetical sorting just an undocumented 
implementation detail?)

So either {{storeStaticProperties}} needs to be renamed to come first 
alphabetically, or {{storeSchemaAccessStrategy}} needs to invoke  
{{storeStaticProperties}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to