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

Puneet Gupta commented on LENS-887:
-----------------------------------

QueryEndNotifier extends AsyncEventListener . The AsyncEventListener has a 
ThreadPool to handle all events asynchronously .
For QueryEndNotifier, the thread pool is created with one fixed thread 
(coorPoolSize =1 and maximumPoolSize=1).
Exceptions from sendMail() are not being caught. This can cause some the worker 
thread in the pool to be removed. But even in this case the pool has mechanism 
to recreate workers if some of them are discarded. Pool should not be a problem 
here.
Not able to see any other causes as of now from code other than some exception 
that is thrown by QueryEndNotifier.process() code each time its called (before 
sendMail() is called) . Since such Exceptions are not being logged, we may be 
unaware of them .
Will do the following changes 
1. Add Naming for threads, so that we are sure all pool threads are healthy 
2. Catch Exceptions in AsyncEventListener.onEvent().
We can also decide on the Pool size . 1 may not be enough when many queries are 
executing parallely. Also ResultFormat extends AsyncEventListener. We will have 
to increase the pool size for result formatting also.

> Query Completion email missing for some queries.
> ------------------------------------------------
>
>                 Key: LENS-887
>                 URL: https://issues.apache.org/jira/browse/LENS-887
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Puneet Gupta
>            Assignee: Puneet Gupta
>
> Noticed that query completion mails suddenly stops coming after a few days of 
> operation.  Only Server Restart resolves the problem. 
> Not much information in logs. QueryEndNotifier log "Sending completion email 
> for query handle: {}" is missing even though queries have completed 
> successfully.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to