Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2504#discussion_r171882320
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryDatabaseTable.java
 ---
    @@ -197,6 +198,12 @@ public void setup(final ProcessContext context) {
             maxValueProperties = 
getDefaultMaxValueProperties(context.getProperties());
         }
     
    +    @OnStopped
    +    public void stop() {
    +        // Reset the column type map in case properties change
    +        setupComplete.set(false);
    --- End diff --
    
    can't we just do the setup in `@OnScheduled` and move the setupComplete 
flag only to `GenerateTableFetch` or remove it? I think the code would be more 
straightforward like this. What do you think?


---

Reply via email to