You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2022/10/21 07:32:01 UTC

[jira] [Updated] (HIVE-25206) Add primary key for partial metadata script

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

Stamatis Zampetakis updated HIVE-25206:
---------------------------------------
    Fix Version/s:     (was: 4.0.0)

I cleared the fixVersion field since this ticket is not resolved. Please review this ticket and if the fix is already committed to a specific version please set the version accordingly and mark the ticket as RESOLVED.

According to the JIRA guidelines (https://cwiki.apache.org/confluence/display/Hive/HowToContribute) the fixVersion should be set only when the issue is resolved/closed.

> Add primary key for partial metadata script
> -------------------------------------------
>
>                 Key: HIVE-25206
>                 URL: https://issues.apache.org/jira/browse/HIVE-25206
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: 4.0.0
>            Reporter: zhangbutao
>            Assignee: zhangbutao
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-25206.1.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
>  
> {code:java}
> standalone-metastore/metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql
> {code}
> Some metadata tables in hive-schema-4.0.0.mysql.sql dont't have primary key. Eg *TXN_COMPONENTS* and  *COMPLETED_TXN_COMPONENTS* . This will cause exception when backend mysql set some strict parameters such as '*global pxc_strict_mode='ENFORCING*''.
> {code:java}
> Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Unable to clean up java.sql.SQLException: Percona-XtraDB-Cluster prohibits use of DML command on a table (hive4s.txn_components) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2814)
>         at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1813)
>         at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1727)
>         at org.apache.hive.com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
>         at org.apache.hive.com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
>         at org.apache.hadoop.hive.metastore.txn.TxnHandler.cleanupRecords(TxnHandler.java:3962)
>         at org.apache.hadoop.hive.metastore.AcidEventListener.onDropDatabase(AcidEventListener.java:58)
>         at org.apache.hadoop.hive.metastore.MetaStoreListenerNotifier$23.notify(MetaStoreListenerNotifier.java:94)
>         at org.apache.hadoop.hive.metastore.MetaStoreListenerNotifier.notifyEvent(MetaStoreListenerNotifier.java:305)
>         at org.apache.hadoop.hive.metastore.HMSHandler.drop_database_core(HMSHandler.java:1893)
>         at org.apache.hadoop.hive.metastore.HMSHandler.drop_database(HMSHandler.java:1954)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147)
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108)
>         at com.sun.proxy.$Proxy28.drop_database(Unknown Source)
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$drop_database.getResult(ThriftHiveMetastore.java:17577)
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$drop_database.getResult(ThriftHiveMetastore.java:17556)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
>         at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:111)
>         at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:107)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1685)
>         at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:119)
>         at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:313)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)