hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Gottlieb (JIRA)" <j...@apache.org>
Subject [jira] [Work started] (HIVE-20173) MetaStoreDirectSql#executeWithArray should not catch RuntimeExceptions from JDO
Date Mon, 19 Nov 2018 20:17:00 GMT

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

Work on HIVE-20173 started by Aaron Gottlieb.
---------------------------------------------
> MetaStoreDirectSql#executeWithArray should not catch RuntimeExceptions from JDO
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-20173
>                 URL: https://issues.apache.org/jira/browse/HIVE-20173
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 1.1.0
>            Reporter: Aaron Gottlieb
>            Assignee: Aaron Gottlieb
>            Priority: Major
>         Attachments: HIVE-20173.patch
>
>
> When attempting to test the existence of a Hive database, the Metastore will query the
backing database.
> The method MetaStoreDirectSql#executeWithArray catches all exceptions, turning them
into MetaExceptions.
> Further up the stack, the ObjectStore#getDatabase explicitly catches MetaExceptions and
turns them into NoSuchObjectExceptions.
> Finally, RetryingHMSHandler explicitly looks for NoSuchObjectExceptions and does _not_
retry them, thinking they are legitimate answers.
> If the exception in MetaStoreDirectSql#executeWithArray was a runtime JDOException due
to, say, some sort of network error between the Metastore and the backing database, this inability
to query the backing database looks just like an answer of "no database exists" higher up
the stack.  Any program depending on this information will continue with an incorrect answer
rather than retrying the original getDatabase query.
> I am unsure the extent of the effects of this, but I imagine that explicitly _not_ catching
RuntimeExceptions in MetaStoreDirectSql#executeWithArray will allow the exception to raise
all the way up to the RetryingHMSHandler which will, correctly, retry the operation.
> Would allowing RuntimeExceptions to be thrown from MetaStoreDirectSql#executeWithArray
be too deleterious?  Or did I miss some code path such that my observations are incorrect?
>  
> Thanks,
> Aaron



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

Mime
View raw message