hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-21028) get_table_meta should use a fetch plan to avoid race conditions ending up in NucleusObjectNotFoundException
Date Fri, 14 Dec 2018 19:34:00 GMT

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

Hive QA commented on HIVE-21028:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12951840/HIVE-21028.branch-3.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 126 failed/errored test(s), 14235 tests executed
*Failed tests:*
{noformat}
TestAddPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestAddPartitionsFromPartSpec - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestAdminUser - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestAggregateStatsCache - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestAlterPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestAlterTableMetadata - did not produce a TEST-*.xml file (likely timed out) (batchId=253)
TestAppendPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestAutoPurgeTables - did not produce a TEST-*.xml file (likely timed out) (batchId=253)
TestBeeLineDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=274)
TestCachedStore - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestCatalogCaching - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestCatalogNonDefaultClient - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestCatalogNonDefaultSvr - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestCatalogOldClient - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestCatalogs - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestCheckConstraint - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestDataSourceProviderFactory - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestDataSourceProviderFactory - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestDatabases - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestDeadline - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestDefaultConstraint - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestDropPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestDummy - did not produce a TEST-*.xml file (likely timed out) (batchId=274)
TestEmbeddedHiveMetaStore - did not produce a TEST-*.xml file (likely timed out) (batchId=231)
TestExchangePartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestFMSketchSerialization - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestFMSketchSerialization - did not produce a TEST-*.xml file (likely timed out) (batchId=239)
TestFilterHooks - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestForeignKey - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestFunctions - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestGetPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestGetPartitionsUsingProjectionAndFilterSpecs - did not produce a TEST-*.xml file (likely
timed out) (batchId=230)
TestGetTableMeta - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestHLLNoBias - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHLLNoBias - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHLLSerialization - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHLLSerialization - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHdfsUtils - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestHiveAlterHandler - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestHiveMetaStoreGetMetaConf - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHiveMetaStorePartitionSpecs - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestHiveMetaStoreSchemaMethods - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestHiveMetaStoreTimeout - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHiveMetaStoreTxns - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHiveMetaStoreWithEnvironmentContext - did not produce a TEST-*.xml file (likely timed
out) (batchId=233)
TestHiveMetastoreCli - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestHyperLogLog - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHyperLogLog - did not produce a TEST-*.xml file (likely timed out) (batchId=239)
TestHyperLogLogDense - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHyperLogLogDense - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHyperLogLogMerge - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHyperLogLogMerge - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestHyperLogLogSparse - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestHyperLogLogSparse - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestJSONMessageDeserializer - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestListPartitions - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestLocationQueries - did not produce a TEST-*.xml file (likely timed out) (batchId=253)
TestLockRequestBuilder - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestMarkPartition - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestMarkPartitionRemote - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestMetaStoreConnectionUrlHook - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestMetaStoreEndFunctionListener - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestMetaStoreEventListener - did not produce a TEST-*.xml file (likely timed out) (batchId=234)
TestMetaStoreEventListenerOnlyOnCommit - did not produce a TEST-*.xml file (likely timed out)
(batchId=236)
TestMetaStoreEventListenerWithOldConf - did not produce a TEST-*.xml file (likely timed out)
(batchId=238)
TestMetaStoreInitListener - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestMetaStoreListenersError - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestMetaStoreSchemaFactory - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestMetaStoreSchemaInfo - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestMetaStoreServerUtils - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestMetastoreConf - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestMetastoreSchemaTool - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestMetrics - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestMiniDruidCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=274)
TestMiniDruidKafkaCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=274)
TestNotNullConstraint - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestObjectStore - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestObjectStore - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestObjectStoreInitRetry - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestObjectStoreSchemaMethods - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestObjectStoreStatementVerify - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestOldSchema - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestPartitionManagement - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestPartitionNameWhitelistValidation - did not produce a TEST-*.xml file (likely timed out)
(batchId=230)
TestPartitionProjectionEvaluator - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestPreUpgradeTool - did not produce a TEST-*.xml file (likely timed out) (batchId=332)
TestPrimaryKey - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestRawStoreProxy - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestRemoteHiveMetaStore - did not produce a TEST-*.xml file (likely timed out) (batchId=232)
TestRemoteHiveMetaStoreIpAddress - did not produce a TEST-*.xml file (likely timed out) (batchId=226)
TestRemoteHiveMetaStoreZK - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestRemoteHiveMetaStoreZKBindHost - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestRemoteUGIHiveMetaStoreIpAddress - did not produce a TEST-*.xml file (likely timed out)
(batchId=235)
TestReplicationScenariosAcidTables - did not produce a TEST-*.xml file (likely timed out)
(batchId=253)
TestRetriesInRetryingHMSHandler - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestRetriesInRetryingHMSHandler - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestRetryingHMSHandler - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestRuntimeStats - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestSchemaToolForMetastore - did not produce a TEST-*.xml file (likely timed out) (batchId=236)
TestSemanticAnalyzerHookLoading - did not produce a TEST-*.xml file (likely timed out) (batchId=253)
TestSetUGIOnBothClientServer - did not produce a TEST-*.xml file (likely timed out) (batchId=229)
TestSetUGIOnOnlyClient - did not produce a TEST-*.xml file (likely timed out) (batchId=227)
TestSetUGIOnOnlyServer - did not produce a TEST-*.xml file (likely timed out) (batchId=237)
TestSparkStatistics - did not produce a TEST-*.xml file (likely timed out) (batchId=253)
TestSparseEncodeHash - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestSparseEncodeHash - did not produce a TEST-*.xml file (likely timed out) (batchId=239)
TestStats - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestStatsSetupConst - did not produce a TEST-*.xml file (likely timed out) (batchId=225)
TestStatsSetupConst - did not produce a TEST-*.xml file (likely timed out) (batchId=239)
TestTableIterable - did not produce a TEST-*.xml file (likely timed out) (batchId=238)
TestTablesCreateDropAlterTruncate - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestTablesGetExists - did not produce a TEST-*.xml file (likely timed out) (batchId=230)
TestTablesList - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestTezPerfCliDriver - did not produce a TEST-*.xml file (likely timed out) (batchId=274)
TestTxnHandlerNegative - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestTxnUtils - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
TestUniqueConstraint - did not produce a TEST-*.xml file (likely timed out) (batchId=228)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[mm_all] (batchId=71)
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[mm_all] (batchId=154)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[external_jdbc_auth] (batchId=161)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[sysdb] (batchId=166)
org.apache.hadoop.hive.ql.TestWarehouseExternalDir.testManagedPaths (batchId=251)
org.apache.hive.jdbc.TestJdbcGenericUDTFGetSplits.testGenericUDTFOrderBySplitCount1 (batchId=259)
org.apache.hive.service.TestHS2ImpersonationWithRemoteMS.testImpersonation (batchId=259)
org.apache.hive.service.cli.thrift.TestThriftCliServiceMessageSize.testMessageSize (batchId=257)
org.apache.hive.spark.client.rpc.TestRpc.testServerPort (batchId=326)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/15329/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/15329/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-15329/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 126 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12951840 - PreCommit-HIVE-Build

> get_table_meta should use a fetch plan to avoid race conditions ending up in NucleusObjectNotFoundException
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-21028
>                 URL: https://issues.apache.org/jira/browse/HIVE-21028
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: 3.0.0
>            Reporter: Karthik Manamcheri
>            Assignee: Karthik Manamcheri
>            Priority: Major
>             Fix For: 4.0.0, 3.2.0
>
>         Attachments: HIVE-21028.1.patch, HIVE-21028.2.patch, HIVE-21028.3.patch, HIVE-21028.4.patch,
HIVE-21028.5.patch, HIVE-21028.branch-3.patch
>
>
> The {{getTableMeta}} call retrieves the tables, loops through the tables and during this
loop it retrieves the database object to get the containing database name. DataNuclues does
a lazy retrieval and so, when the first call to get all the tables is done, it does not retrieve
the database objects.
> When this query is executed
> {code}query = pm.newQuery(MTable.class, filterBuilder.toString());
> {code}
> it loads all the tables, and when you do
> {code}
> table.getDatabase().getName()
> {code}
> it then goes and retrieves the database object.
> *However*, there could be another thread which actually has deleted the database!! If
this happens, we end up with exceptions such as
> {code}
> 2018-12-04 22:25:06,525 INFO  DataNucleus.Datastore.Retrieve: [pool-7-thread-191]: Object
with id "6930391[OID]org.apache.hadoop.hive.metastore.model.MTable" not found !
> 2018-12-04 22:25:06,527 WARN  DataNucleus.Persistence: [pool-7-thread-191]: Exception
thrown by StateManager.isLoaded
> No such database row
> org.datanucleus.exceptions.NucleusObjectNotFoundException: No such database row
> {code}
> We see this happen especially with calls which retrieve all the tables in all the databases
(basically a call to get_table_meta with dbNames="\*" and tableNames="\*").
> To avoid this, we can define a custom fetch plan and activate it only for the get_table_meta
query. This fetch plan would fetch the database object along with the MTable object.
> We would first create a fetch plan on the pmf
> {code}
> pmf.getFetchGroup(MTable.class, "mtable_db_fetch_group").addMember("database");
> {code}
> Then we use it just before calling the query
> {code}
> pm.getFetchPlan().addGroup("mtable_db_fetch_group");
> query = pm.newQuery(MTable.class, filterBuilder.toString());
> Collection<MTable> tables = (Collection<MTable>) query.executeWithArray(...);
> ...
> {code}
> Before the API call ends, we can remove the fetch plan by
> {code}
> pm.getFetchPlan().removeGroup("mtable_db_fetch_group");
> {code}



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

Mime
View raw message