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

Quanlong Huang commented on IMPALA-11046:
-----------------------------------------

DCHECKs are only get compiled in DEBUG builds. We use them to reveal bugs asap 
in developement (just like you found you passed an incorrect index). In 
production we use RELEASE builds which ignore all the DCHECKs. So I think it's 
fine for this code.

> When GetTupleIdx fails, it should return INVALID_IDX, not bring down impalad
> ----------------------------------------------------------------------------
>
>                 Key: IMPALA-11046
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11046
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Steve Carlin
>            Assignee: Steve Carlin
>            Priority: Major
>
> The following code exists in runtime/descriptors.cc:
>  int RowDescriptor::GetTupleIdx(TupleId id) const {
>   DCHECK_LT(id, tuple_idx_map_.size()) << "RowDescriptor: " << DebugString();
>    return tuple_idx_map_[id];
>  }
>  
> If the id doesn't exist in the map, it returns INVALID_IDX. However, if the 
> id >= tuple_idx_size, it crashes the server.
> I was working on an issue on the frontend where I passed an incorrect index 
> and it failed the query when I passed a bad index in both instances, but it 
> was much preferable not to crash the server and only fail the query.  So the 
> proposal here is to get rid of the DCHECK_LT and replace it with a "return 
> INVALID_IDX" when it fails.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to