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

Ashutosh Chauhan commented on HIVE-2510:
----------------------------------------

Looks like RB is no longer posting back on jira. I had the comment there about 
error message.

There are two concerns I have while doing such metastore related checks in 
SemanticAnalyzer. First it introduces TOCTTOU bug ( 
http://en.wikipedia.org/wiki/Time-of-check-to-time-of-use ) since there is a 
small window when its possible that database get dropped after this call to 
metastore has completed but before actual table creation happens. Second 
concern which is a bigger concern is that it adds load on metastore server (if 
running as independent server) and on backend sql server to service these 
additional requests. Ideally, all such checks should be bundled together in a 
create table call to MetaStore (instead of few of them being done in 
SemanticAnalyzer) which then do all the checks and then take appropriate 
action. This will help for both concerns as first it will reduce extra calls 
and second if there is a need of multiple calls on mysql they can potentially 
be done in a scope of one transaction.  


                
> Hive throws Null Pointer Exception upon CREATE TABLE <db_name>.<table_name> 
> ....     if the given <db_name> doesn't exist
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2510
>                 URL: https://issues.apache.org/jira/browse/HIVE-2510
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Robert Surówka
>            Assignee: Robert Surówka
>            Priority: Trivial
>         Attachments: HIVE-2510.1.patch, HIVE-2510.2.patch, HIVE-2510.3.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to