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

Daniel Wong commented on PHOENIX-5510:
--------------------------------------

A new method for logging errors dealing with logging essentially what I was 
proposing.

In my case if I wanted to log an error message saying that since we have 
unclosed result sets and statements.  During close of a 
LoggingPhoenixConnection the class does not have access to SQL stored in the 
statements/result sets it contains.  In addition, if we wanted to indicate that 
the metrics for READS from an unclosed result set were not recorded, ie Read 
path interface was not called.  There is no method to do so today other than 
hacky ways like calling read interface with make belive SQL or make believe 
additional metrics to indicate these were not recorded.  This means I cannot 
put my code which uses my internal logging solution into open source as I 
manually changed LoggingPhoenixConnection and directly called into my logging 
libraries.  If there was a metrics error method, I could have indicated there 
during close of connection that the metrics were missing.

> LoggingPhoenixConnection on close does not log with unclosed 
> statements/result sets
> -----------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5510
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5510
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.1, 4.14.3
>            Reporter: Daniel Wong
>            Priority: Minor
>
> Testing the LoggingPhoenixConnection it does not handle request level metrics 
> for unclosed statements/result sets.  This is due to the delegate nature 
> where the resulting PhoenixConnection ends up closing these without ever 
> going through a delegate.  Without this log or an way to inform the user that 
> these occurred operations are essentially blind to these requests.



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

Reply via email to