[ 
https://issues.apache.org/jira/browse/NIFI-6989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17011326#comment-17011326
 ] 

Matt Burgess edited comment on NIFI-6989 at 1/9/20 2:36 AM:
------------------------------------------------------------

And unfortunately, not calling complete() or cancel() causes a SocketTimeout on 
Raw connections which logs an error (but not a bulletin), looks like HTTP don't 
log or report anything (likely because nothing is sent over the wire)


was (Author: mattyb149):
And unfortunately, not calling complete() or cancel() causes a SocketTimeout on 
Raw connections, not sure yet what the effect is on HTTP connections.

> SiteToSiteReportingRecordSink reports error when no data is sent
> ----------------------------------------------------------------
>
>                 Key: NIFI-6989
>                 URL: https://issues.apache.org/jira/browse/NIFI-6989
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>            Priority: Major
>             Fix For: 1.11.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If no data is transmitted during a transaction in 
> SiteToSiteReportingRecordSink, the following error is thrown:
> Error during transmission of query results due to Failed to write metrics 
> using record writer: Cannot confirm Transaction because state is 
> TRANSACTION_STARTED; Transaction can only be confirmed when state is 
> DATA_EXCHANGED: java.io.IOException: Failed to write metrics using record 
> writer: Cannot confirm Transaction because state is TRANSACTION_STARTED; 
> Transaction can only be confirmed when state is DATA_EXCHANGED
> java.io.IOException: Failed to write metrics using record writer: Cannot 
> confirm Transaction because state is TRANSACTION_STARTED; Transaction can 
> only be confirmed when state is DATA_EXCHANGED
>       at 
> org.apache.nifi.reporting.sink.SiteToSiteReportingRecordSink.sendData(SiteToSiteReportingRecordSink.java:172)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:87)
> This can be reproduced by using QueryNiFiReportingTask with a query that 
> returns no rows (such as SELECT * FROM CONNECTION_STATUS WHERE 1=0) when Send 
> Zero Results is false.
> The call to confirm() and complete() should only be done when a send() has 
> occurred, so it needs to be moved inside the if-block above it.



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

Reply via email to