[ 
https://issues.apache.org/jira/browse/KYLIN-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhong Yanghong updated KYLIN-3238:
----------------------------------
    Description: 
Currently we suppose if a cube is in READY status, there should exist READY 
segments. Then when this kind of cube is selected as a candidate for a query, 
neither {{getLatestReadySegment}} in {{CubeInstance}} will return null, nor 
{{cube.getSegments().get(0)}} will throw {{IndexOutOfBoundsException}}.

However, currently we allow to delete segments by REST API when cube is in 
READY status, which I think it's not reasonable. To deal with this issue, I 
propose not to allow segment deletion by REST API when its cube is in READY 
status.

  was:
Currently we suppose if a cube is in READY status, there should exist READY 
segments. Then when this kind of cube is selected as a candidate for a query, 
neither {{getLatestReadySegment}} in {{CubeInstance}} will return null, nor 
{{cube.getSegments().get(0)}} will throw {{IndexOutOfBoundsException}}.

However, there's no validation 


> Fix NPE when CubeInstance.getLatestReadySegment() returns null
> --------------------------------------------------------------
>
>                 Key: KYLIN-3238
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3238
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: Zhong Yanghong
>            Assignee: Zhong Yanghong
>            Priority: Major
>
> Currently we suppose if a cube is in READY status, there should exist READY 
> segments. Then when this kind of cube is selected as a candidate for a query, 
> neither {{getLatestReadySegment}} in {{CubeInstance}} will return null, nor 
> {{cube.getSegments().get(0)}} will throw {{IndexOutOfBoundsException}}.
> However, currently we allow to delete segments by REST API when cube is in 
> READY status, which I think it's not reasonable. To deal with this issue, I 
> propose not to allow segment deletion by REST API when its cube is in READY 
> status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to