[ 
https://issues.apache.org/jira/browse/HIVE-26016?focusedWorklogId=739318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739318
 ]

ASF GitHub Bot logged work on HIVE-26016:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Mar/22 08:46
            Start Date: 10/Mar/22 08:46
    Worklog Time Spent: 10m 
      Work Description: wecharyu commented on a change in pull request #3085:
URL: https://github.com/apache/hive/pull/3085#discussion_r823475572



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -2333,11 +2333,6 @@ private void create_table_core(final RawStore ms, final 
CreateTableRequest req)
       isReplicated = isDbReplicationTarget(db);
 
       firePreEvent(new PreCreateTableEvent(tbl, db, this));
-      // get_table checks whether database exists, it should be moved here
-      if (is_table_exists(ms, tbl.getCatName(), tbl.getDbName(), 
tbl.getTableName())) {
-        throw new AlreadyExistsException("Table " + 
getCatalogQualifiedTableName(tbl)
-            + " already exists");
-      }

Review comment:
       Double check is not necessary, transactions of different `pm`s do not 
affect each other, and the eventual consistency is guaranteed by the backend 
RDBMS.
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 739318)
    Time Spent: 0.5h  (was: 20m)

> Remove duplicate table exists check in create_table_core api of HMSHandler
> --------------------------------------------------------------------------
>
>                 Key: HIVE-26016
>                 URL: https://issues.apache.org/jira/browse/HIVE-26016
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>            Reporter: Yu Weiqiang
>            Assignee: Yu Weiqiang
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently create_table_core() will check if table exists before opening 
> transaction, it does not need to check again after opening transaction, can 
> remove the unnecessary check code.



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

Reply via email to