gaurav kadaskar created NIFI-15634:
--------------------------------------

             Summary: Full query execution during metadata discovery for 
Generic/MySQL in QueryDatabaseTableRecord causes high heap usage.
                 Key: NIFI-15634
                 URL: https://issues.apache.org/jira/browse/NIFI-15634
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 2.7.2
            Reporter: gaurav kadaskar


h3. Problem

When Database Type is set to Generic or MySQL in QueryDatabaseTableRecord,
getDatabaseDialectService() returns DatabaseAdapterDatabaseDialectService.

During metadata discovery, NiFi executes the full user query instead of using a
metadata-only query. Since no guard condition is applied, the query scans the
entire dataset, which leads to high heap usage and JVM memory pressure for
large result sets.

h3. Previous Behavior

Earlier NiFi versions generated a metadata-safe query by appending:

{code:sql}
WHERE 1=0
{code}

This allowed schema retrieval without reading actual data.

h3. Expected Behavior

Metadata discovery should use a metadata-only query and must not execute the
full user query.

h3. Current Behavior

Full user query is executed to obtain metadata.



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

Reply via email to