[
https://issues.apache.org/jira/browse/NIFI-9653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ron Milne updated NIFI-9653:
----------------------------
Description:
When inserting data into the (postgreSQL) DB where a duplicate key exception
will be raised. All records that fail are moved to the *retry* queue rather
than the *failure* queue. This floods the app-log - is it usual practice to
place the retry back onto PutSQL? This potentially leads to root cause analysis
becoming difficult as no exception information is attached to the flowfile.
07:26:48 UTC
ERROR
6dfd7bdd-d625-345e-66cc-ec710ddba59a
PutSQL[id=6dfd7bdd-d625-345e-66cc-ec710ddba59a] Failed to update database for
StandardFlowFileRecord[uuid=97c778c0-fe4e-4533-a9d1-e40daba227f7,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1643764574088-5, container=default,
section=5], offset=69481, length=95],offset=0,name=incoming.csv,size=95] due to
ERROR: current transaction is aborted, commands ignored until end of
transaction block; it is possible that retrying the operation will succeed, so
routing to retry: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "onboarding_pkey"
Detail: Key (identifier)=(1625) already exists.
↳ causes: org.postgresql.util.PSQLException: ERROR: current transaction is
aborted, commands ignored until end of transaction block
was:
When inserting data into the DB where a duplicate key exception will be raised.
All records that fail are moved to the *retry* queue rather than the *failure*
queue. This floods the app-log - is it usual practice to place the retry back
onto PutSQL? This potentially leads to root cause analysis becoming difficult
as no exception information is attached to the flowfile.
07:26:48 UTC
ERROR
6dfd7bdd-d625-345e-66cc-ec710ddba59a
PutSQL[id=6dfd7bdd-d625-345e-66cc-ec710ddba59a] Failed to update database for
StandardFlowFileRecord[uuid=97c778c0-fe4e-4533-a9d1-e40daba227f7,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1643764574088-5, container=default,
section=5], offset=69481, length=95],offset=0,name=incoming.csv,size=95] due to
ERROR: current transaction is aborted, commands ignored until end of
transaction block; it is possible that retrying the operation will succeed, so
routing to retry: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "onboarding_pkey"
Detail: Key (identifier)=(1625) already exists.
↳ causes: org.postgresql.util.PSQLException: ERROR: current transaction is
aborted, commands ignored until end of transaction block
> PutSQL Duplicate Key Exception moves flowfile to retry
> ------------------------------------------------------
>
> Key: NIFI-9653
> URL: https://issues.apache.org/jira/browse/NIFI-9653
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.15.3
> Reporter: Ron Milne
> Priority: Major
> Labels: starter
>
> When inserting data into the (postgreSQL) DB where a duplicate key exception
> will be raised. All records that fail are moved to the *retry* queue rather
> than the *failure* queue. This floods the app-log - is it usual practice to
> place the retry back onto PutSQL? This potentially leads to root cause
> analysis becoming difficult as no exception information is attached to the
> flowfile.
> 07:26:48 UTC
> ERROR
> 6dfd7bdd-d625-345e-66cc-ec710ddba59a
>
> PutSQL[id=6dfd7bdd-d625-345e-66cc-ec710ddba59a] Failed to update database for
> StandardFlowFileRecord[uuid=97c778c0-fe4e-4533-a9d1-e40daba227f7,claim=StandardContentClaim
> [resourceClaim=StandardResourceClaim[id=1643764574088-5, container=default,
> section=5], offset=69481, length=95],offset=0,name=incoming.csv,size=95] due
> to ERROR: current transaction is aborted, commands ignored until end of
> transaction block; it is possible that retrying the operation will succeed,
> so routing to retry: org.postgresql.util.PSQLException: ERROR: duplicate key
> value violates unique constraint "onboarding_pkey"
> Detail: Key (identifier)=(1625) already exists.
> ↳ causes: org.postgresql.util.PSQLException: ERROR: current transaction is
> aborted, commands ignored until end of transaction block
--
This message was sent by Atlassian Jira
(v8.20.1#820001)