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

Himanshu Gahlaut commented on LENS-606:
---------------------------------------

For loop at line at line: 
https://github.com/apache/incubator-lens/blob/master/lens-cube/src/main/java/org/apache/lens/cube/parse/TimerangeResolver.java#L154
 is executed in multiple estimate threads. 
Order of iteration on columns in this for loop is random because 
cubeql.getColumnsQueried returns a HashSet. 

Since order of iteration is random, the first column which fails column life 
validation in different estimate threads is random, resulting in a different 
ColUnAvailableInTimeRange instance from different estimate threads. 

Due to different ColUnAvailableInTimeRange instance, parent thread of estimate 
threads throws a LensMultiCauseException instead of 
ColumnUnAvailableInTimeRangeException. This leads to Rest API returning 1001 
error code. 

By ensuring order of iteration, code will be able to throw 
ColumnUnAvailableInTimeRangeException and REST API in turn will throw error 
code 3002 which will be more helpful.

> Ensuring order of iteration in Column Time Range Availability check in 
> different estimate threads
> -------------------------------------------------------------------------------------------------
>
>                 Key: LENS-606
>                 URL: https://issues.apache.org/jira/browse/LENS-606
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Himanshu Gahlaut
>            Assignee: Himanshu Gahlaut
>         Attachments: LENS-606.01.patch
>
>




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

Reply via email to